grub_halt()
grub_halt is on i386-pc defined as void grub_halt (int no_apm)' but everywhere else as grub_halt (void)'util/grub-emu.c has a #ifdef for these 2
Shouldn't we just add an int parameter everywhere to make this more simple?
grub-emu fails to build on powerpc now because grub/cpu/halt.h doestn't exist there:
https://buildd.debian.org/fetch.cgi?pkg=grub2;ver=1.97%2B20091125-1;arch=powerpc;stamp=1259179180
Signature · 2 lines
Felix Zielcke Proud Debian Maintainer and GNU GRUB developer
Quoted 8 lines · Felix Zielcke
grub_haltis on i386-pc defined asvoid grub_halt (int no_apm)' but everywhere else asgrub_halt(void)'util/grub-emu.chas a #ifdef for these 2Shouldn't we just add an int parameter everywhere to make this more simple?
I think in future we'll have more different halt methods on different platforms. So we could do:grub_halt (int methods)
And have e.g.GRUB_HALT_DEFAULT_METHODS
And e.g. on i386:
#define GRUB_HALT_DEFAULT_METHODS (GRUB_HALT_APM|GRUB_HALT_ACPI|GRUB_HALT_HANG)
Quoted 4 lines
grub-emu fails to build on powerpc now because
grub/cpu/halt.hdoestn't exist there:
https://buildd.debian.org/fetch.cgi?pkg=grub2;ver=1.97%2B20091125-1;arch=powerpc;stamp=1259179180
Signature · 2 lines
Regards Vladimir 'φ-coder/phcoder' Serbinenko
Am Freitag, den 27.11.2009, 22:24 +0100 schrieb Vladimir 'φ-coder/phcoder' Serbinenko:
Quoted 9 lines
Quoted 8 lines · Felix Zielcke
grub_haltis on i386-pc defined asvoid grub_halt (int no_apm)' but everywhere else asgrub_halt(void)'util/grub-emu.chas a #ifdef for these 2Shouldn't we just add an int parameter everywhere to make this more simple?
Quoted 8 lines
I think in future we'll have more different halt methods on different platforms. So we could do:
grub_halt(int methods)
And have e.g.GRUB_HALT_DEFAULT_METHODS
And e.g. on i386:
#defineGRUB_HALT_DEFAULT_METHODS(GRUB_HALT_APM|GRUB_HALT_ACPI|GRUB_HALT_HANG)
Wouldn't be an enum then be better?
But I don't know how to handle this with asm where currently grub_halt() on i386 seems to be actually defined.
Quoted 7 lines
Quoted 1 line
grub-emu fails to build on powerpc now because
grub/cpu/halt.hdoestn't
Quoted 2 lines
exist there:
https://buildd.debian.org/fetch.cgi?pkg=grub2;ver=1.97%2B20091125-1;ar
ch=powerpc;stamp=1259179180Quoted 1 line
It fails also on sparc because of this.
Signature · 2 lines
Felix Zielcke Proud Debian Maintainer and GNU GRUB developer
Quoted 9 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 8 lines · Felix Zielcke
grub_haltis on i386-pc defined asvoid grub_halt (int no_apm)' but everywhere else asgrub_halt(void)'util/grub-emu.chas a #ifdef for these 2Shouldn't we just add an int parameter everywhere to make this more simple?
Quoted 8 lines
I think in future we'll have more different halt methods on different platforms. So we could do:
grub_halt(int methods)
And have e.g.GRUB_HALT_DEFAULT_METHODS
And e.g. on i386:
#defineGRUB_HALT_DEFAULT_METHODS(GRUB_HALT_APM|GRUB_HALT_ACPI|GRUB_HALT_HANG)
I was hoping we could remove complexity rather than add more of it.
Why would higher layer (who's just calling grub_halt because it wants the system to shutdown) want to know about things like APM or ACPI ?
Signature · 5 lines
Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."
Quoted 19 lines · Robert Millan
Quoted 9 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 8 lines · Felix Zielcke
grub_haltis on i386-pc defined asvoid grub_halt (int no_apm)' but everywhere else asgrub_halt(void)'util/grub-emu.chas a #ifdef for these 2Shouldn't we just add an int parameter everywhere to make this more simple?
Quoted 8 lines
I think in future we'll have more different halt methods on different platforms. So we could do:
grub_halt(int methods)
And have e.g.GRUB_HALT_DEFAULT_METHODS
And e.g. on i386:
#defineGRUB_HALT_DEFAULT_METHODS(GRUB_HALT_APM|GRUB_HALT_ACPI|GRUB_HALT_HANG)
Quoted 4 lines
I was hoping we could remove complexity rather than add more of it.
Why would higher layer (who's just calling
grub_haltbecause it wants the system to shutdown) want to know about things like APM or ACPI ?
Well, for now I just unified the headers but kept the current i386-pc function parameters. This restores experimental to a buildable state.
Signature · 5 lines
Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."