diff --git a/ChangeLog b/ChangeLog index cf230ba25..6e6b598a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-07-01 Robert Millan + + * util/misc.c: Include `' and `'. + (grub_reboot, grub_halt): New functions. + + * util/i386/pc/misc.c: Delete. Update all users. + * util/sparc64/ieee1275/misc.c: Likewise. + * util/powerpc/ieee1275/misc.c: Likewise. + 2009-07-01 Robert Millan * conf/i386.rmk (setjmp_mod_SOURCES) diff --git a/conf/i386-coreboot.rmk b/conf/i386-coreboot.rmk index fb65322fc..c70f7d2a0 100644 --- a/conf/i386-coreboot.rmk +++ b/conf/i386-coreboot.rmk @@ -138,7 +138,6 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \ partmap/acorn.c partmap/gpt.c \ util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ util/hostdisk.c util/getroot.c \ - util/i386/pc/misc.c \ \ disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \ disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \ diff --git a/conf/i386-efi.rmk b/conf/i386-efi.rmk index 4e898068d..75aa611e7 100644 --- a/conf/i386-efi.rmk +++ b/conf/i386-efi.rmk @@ -65,7 +65,6 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \ partmap/acorn.c partmap/gpt.c \ util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ util/hostdisk.c util/getroot.c \ - util/i386/pc/misc.c \ \ disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \ disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \ diff --git a/conf/i386-ieee1275.rmk b/conf/i386-ieee1275.rmk index a7b8e07f8..513e1b7bc 100644 --- a/conf/i386-ieee1275.rmk +++ b/conf/i386-ieee1275.rmk @@ -92,7 +92,6 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \ partmap/acorn.c partmap/gpt.c \ util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ util/hostdisk.c util/getroot.c \ - util/i386/pc/misc.c \ \ disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \ disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \ diff --git a/conf/i386-pc.rmk b/conf/i386-pc.rmk index 6ae167c6d..f1915b646 100644 --- a/conf/i386-pc.rmk +++ b/conf/i386-pc.rmk @@ -158,7 +158,6 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \ \ util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ util/hostdisk.c util/getroot.c \ - util/i386/pc/misc.c \ \ disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \ disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \ diff --git a/conf/powerpc-ieee1275.rmk b/conf/powerpc-ieee1275.rmk index b424b0a3c..b12635ebd 100644 --- a/conf/powerpc-ieee1275.rmk +++ b/conf/powerpc-ieee1275.rmk @@ -73,7 +73,6 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \ partmap/acorn.c \ util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ util/hostdisk.c util/getroot.c \ - util/powerpc/ieee1275/misc.c \ \ disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \ disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \ diff --git a/conf/sparc64-ieee1275.rmk b/conf/sparc64-ieee1275.rmk index 4a2fb6698..c3c10ef2e 100644 --- a/conf/sparc64-ieee1275.rmk +++ b/conf/sparc64-ieee1275.rmk @@ -129,7 +129,6 @@ grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \ partmap/acorn.c \ util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ util/hostdisk.c util/getroot.c \ - util/sparc64/ieee1275/misc.c \ \ disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \ disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \ diff --git a/conf/x86_64-efi.rmk b/conf/x86_64-efi.rmk index 95e5ac610..21da0e1cf 100644 --- a/conf/x86_64-efi.rmk +++ b/conf/x86_64-efi.rmk @@ -62,7 +62,6 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \ partmap/acorn.c partmap/gpt.c \ util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ util/hostdisk.c util/getroot.c \ - util/i386/pc/misc.c \ \ disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \ disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \ diff --git a/util/i386/pc/misc.c b/util/i386/pc/misc.c deleted file mode 100644 index 8490fbf70..000000000 --- a/util/i386/pc/misc.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * GRUB -- GRand Unified Bootloader - * Copyright (C) 2005,2007 Free Software Foundation, Inc. - * - * GRUB is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GRUB is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GRUB. If not, see . - */ - -#include - -#include - -void -grub_reboot (void) -{ - longjmp (main_env, 1); -} - -void -grub_halt (int no_apm __attribute__ ((unused))) -{ - grub_reboot (); -} diff --git a/util/misc.c b/util/misc.c index 939867b7f..2d0039028 100644 --- a/util/misc.c +++ b/util/misc.c @@ -18,6 +18,7 @@ #include +#include #include #include #include @@ -36,6 +37,7 @@ #include #include #include +#include /* Include malloc.h, only if memalign is available. It is known that memalign is declared in malloc.h in all systems, if present. */ @@ -436,4 +438,20 @@ fail: return size; } +#endif /* __MINGW32__ */ + +void +grub_reboot (void) +{ + longjmp (main_env, 1); +} + +void +grub_halt ( +#ifdef GRUB_MACHINE_PCBIOS + int no_apm __attribute__ ((unused)) #endif + ) +{ + grub_reboot (); +} diff --git a/util/powerpc/ieee1275/misc.c b/util/powerpc/ieee1275/misc.c deleted file mode 100644 index b0ce83bd2..000000000 --- a/util/powerpc/ieee1275/misc.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * GRUB -- GRand Unified Bootloader - * Copyright (C) 2005,2007 Free Software Foundation, Inc. - * - * GRUB is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GRUB is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GRUB. If not, see . - */ - -#include - -#include - -void -grub_reboot (void) -{ - longjmp (main_env, 1); -} - -void -grub_halt (void) -{ - grub_reboot (); -} diff --git a/util/sparc64/ieee1275/misc.c b/util/sparc64/ieee1275/misc.c deleted file mode 100644 index 99b95132e..000000000 --- a/util/sparc64/ieee1275/misc.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * GRUB -- GRand Unified Bootloader - * Copyright (C) 2009 Free Software Foundation, Inc. - * - * GRUB is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GRUB is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GRUB. If not, see . - */ - -#include - -#include - -void -grub_reboot (void) -{ - longjmp (main_env, 1); -} - -void -grub_halt (void) -{ - grub_reboot (); -}