]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-12-04 Robert Millan <rmh.grub@aybabtu.com>
authorRobert Millan <rmh@aybabtu.com>
Thu, 3 Dec 2009 23:07:29 +0000 (23:07 +0000)
committerRobert Millan <rmh@aybabtu.com>
Thu, 3 Dec 2009 23:07:29 +0000 (23:07 +0000)
        * commands/halt.c: Replace misc arch-specific headers with
        `<grub/misc.h>'.
        * commands/reboot.c: Likewise.
        * commands/i386/pc/halt.c: Replace `<grub/machine/init.h>' with
        `<grub/misc.h>'.
        * conf/i386-coreboot.rmk (kernel_img_HEADERS): Remove `cpu/reboot.h'.
        (halt_mod_SOURCES): Move `kern/i386/halt.c' from here ...
        (kernel_img_SOURCES): ... to here.

        * include/grub/efi/efi.h (grub_reboot, grub_halt): Remove prototypes.
        * include/grub/i386/pc/init.h: Likewise.
        * include/grub/powerpc/ieee1275/kernel.h: Likewise.
        * include/grub/sparc64/ieee1275/kernel.h: Likewise.

        * include/grub/misc.h (grub_reboot, grub_halt): New prototypes.

        * include/grub/i386/halt.h: Remove.
        * include/grub/i386/reboot.h: Likewise.

        * kern/i386/halt.c: Remove `<grub/cpu/halt.h>'.

13 files changed:
ChangeLog
commands/halt.c
commands/i386/pc/halt.c
commands/reboot.c
conf/i386-coreboot.rmk
include/grub/efi/efi.h
include/grub/i386/halt.h [deleted file]
include/grub/i386/pc/init.h
include/grub/i386/reboot.h [deleted file]
include/grub/misc.h
include/grub/powerpc/ieee1275/kernel.h
include/grub/sparc64/ieee1275/kernel.h
kern/i386/halt.c

index 9ceebeb41da3837c9029393ba27e49073a1be89f..933fc3f7bf0442ad23b6052c6d5106bfb62e5778 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2009-12-04  Robert Millan  <rmh.grub@aybabtu.com>
+
+       * commands/halt.c: Replace misc arch-specific headers with
+       `<grub/misc.h>'.
+       * commands/reboot.c: Likewise.
+       * commands/i386/pc/halt.c: Replace `<grub/machine/init.h>' with
+       `<grub/misc.h>'.
+       * conf/i386-coreboot.rmk (kernel_img_HEADERS): Remove `cpu/reboot.h'.
+       (halt_mod_SOURCES): Move `kern/i386/halt.c' from here ...
+       (kernel_img_SOURCES): ... to here.
+
+       * include/grub/efi/efi.h (grub_reboot, grub_halt): Remove prototypes.
+       * include/grub/i386/pc/init.h: Likewise.
+       * include/grub/powerpc/ieee1275/kernel.h: Likewise.
+       * include/grub/sparc64/ieee1275/kernel.h: Likewise.
+
+       * include/grub/misc.h (grub_reboot, grub_halt): New prototypes.
+
+       * include/grub/i386/halt.h: Remove.
+       * include/grub/i386/reboot.h: Likewise.
+
+       * kern/i386/halt.c: Remove `<grub/cpu/halt.h>'.
+
 2009-12-03  David S. Miller  <davem@sunset.davemloft.net>
 
        * conf/sparc64-ieee1275.rmk (grub_mkimage_SOURCES,
index 9a42938b4c0217e26fca10c454d476911c1961ad..8fa8db5be73efcfa88f83f052498f7b2e5ae1825 100644 (file)
 
 #include <grub/dl.h>
 #include <grub/command.h>
-
-#if defined(GRUB_MACHINE_IEEE1275)
-#include <grub/machine/kernel.h>
-#elif defined(GRUB_MACHINE_EFI)
-#include <grub/efi/efi.h>
-#else
-/* Platforms shipping standalone halt, such as coreboot.  */
-#include <grub/cpu/halt.h>
-#endif
+#include <grub/misc.h>
 
 static grub_err_t
 grub_cmd_halt (grub_command_t cmd __attribute__ ((unused)),
index add8631a882933ccc04ccce3b70165ce30f9822d..344dcecd8577e933b82d2162290b2cf312bccd61 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #include <grub/dl.h>
-#include <grub/machine/init.h>
+#include <grub/misc.h>
 #include <grub/extcmd.h>
 
 static const struct grub_arg_option options[] =
index 0b553b710e0d65557c6e05fd3e6f964ab4d94025..86c9e2dd94acf3f9f87733a45cbf88dd5ddb0de7 100644 (file)
 
 #include <grub/dl.h>
 #include <grub/command.h>
-
-#if defined(GRUB_MACHINE_IEEE1275)
-#include <grub/machine/kernel.h>
-#elif defined(GRUB_MACHINE_EFI)
-#include <grub/efi/efi.h>
-#elif defined(GRUB_MACHINE_PCBIOS)
-#include <grub/machine/init.h>
-#else
-/* Platforms shipping standalone reboot, such as coreboot.  */
-#include <grub/cpu/reboot.h>
-#endif
-
+#include <grub/misc.h>
 
 static grub_err_t
 grub_cmd_reboot (grub_command_t cmd __attribute__ ((unused)),
index 541b0777e274293aaf2c54a378d8cbb788635717..e597328e7b5e51e44d9dc41cdd569457c0fb90f0 100644 (file)
@@ -18,6 +18,7 @@ kernel_img_SOURCES = kern/i386/coreboot/startup.S \
        kern/i386/misc.S \
        kern/i386/coreboot/init.c \
        kern/i386/multiboot_mmap.c \
+       kern/i386/halt.c \
        kern/main.c kern/device.c \
        kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
        kern/misc.c kern/mm.c kern/reader.c kern/term.c \
@@ -33,7 +34,6 @@ kernel_img_SOURCES = kern/i386/coreboot/startup.S \
 kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
        env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
        partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
-       cpu/reboot.h \
        machine/boot.h machine/console.h machine/init.h \
        machine/memory.h machine/loader.h list.h handler.h command.h i18n.h
 kernel_img_CFLAGS = $(COMMON_CFLAGS)
@@ -62,6 +62,7 @@ kernel_img_SOURCES = kern/i386/qemu/startup.S \
        kern/i386/misc.S \
        kern/i386/coreboot/init.c \
        kern/i386/qemu/mmap.c \
+       kern/i386/halt.c \
        kern/main.c kern/device.c \
        kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
        kern/misc.c kern/mm.c kern/reader.c kern/term.c \
@@ -77,7 +78,6 @@ kernel_img_SOURCES = kern/i386/qemu/startup.S \
 kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
        env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
        partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
-       cpu/reboot.h \
        machine/boot.h machine/console.h machine/init.h \
        machine/memory.h machine/loader.h list.h handler.h command.h i18n.h
 kernel_img_CFLAGS = $(COMMON_CFLAGS) -DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)
@@ -131,7 +131,7 @@ reboot_mod_CFLAGS = $(COMMON_CFLAGS)
 reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
 # For halt.mod.
-halt_mod_SOURCES = commands/halt.c kern/i386/halt.c
+halt_mod_SOURCES = commands/halt.c
 halt_mod_CFLAGS = $(COMMON_CFLAGS)
 halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
index 916f9d662390d48e6eb1402eaa7f3c20d8cd9940..43f1529816c2b693805812b34ef4e2eae50fa565 100644 (file)
@@ -54,8 +54,6 @@ char *EXPORT_FUNC(grub_efi_get_filename) (grub_efi_device_path_t *dp);
 grub_efi_device_path_t *
 EXPORT_FUNC(grub_efi_get_device_path) (grub_efi_handle_t handle);
 int EXPORT_FUNC(grub_efi_exit_boot_services) (grub_efi_uintn_t map_key);
-void EXPORT_FUNC (grub_reboot) (void);
-void EXPORT_FUNC (grub_halt) (void);
 int EXPORT_FUNC (grub_efi_finish_boot_services) (void);
 
 void grub_efi_mm_init (void);
diff --git a/include/grub/i386/halt.h b/include/grub/i386/halt.h
deleted file mode 100644 (file)
index 1c403a7..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2008  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 <http://www.gnu.org/licenses/>.
- */
-
-extern void grub_halt (void);
index 0029959aea2021905197786411d11bd1b5f5214b..2be80e7730c6b86512a097b0d47bd54c68495136 100644 (file)
@@ -39,13 +39,6 @@ grub_uint32_t EXPORT_FUNC(grub_get_mmap_entry) (struct grub_machine_mmap_entry *
 /* Turn on/off Gate A20.  */
 void grub_gate_a20 (int on);
 
-/* Reboot the machine.  */
-void EXPORT_FUNC (grub_reboot) (void);
-
-/* Halt the system, using APM if possible. If NO_APM is true, don't
- * use APM even if it is available.  */
-void EXPORT_FUNC (grub_halt) (int no_apm);
-
 void EXPORT_FUNC(grub_stop_floppy) (void);
 
 #endif /* ! GRUB_INIT_MACHINE_HEADER */
diff --git a/include/grub/i386/reboot.h b/include/grub/i386/reboot.h
deleted file mode 100644 (file)
index 1f2da1d..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2008  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 <http://www.gnu.org/licenses/>.
- */
-
-extern void EXPORT_FUNC(grub_reboot) (void);
index 31d4ddf857f0596c34c90e2f66da156bbb7cc1ab..79dafa831cb7c3d1c549fedd3c437b39b00e22fb 100644 (file)
@@ -222,4 +222,15 @@ grub_div_roundup (unsigned int x, unsigned int y)
   return (x + y - 1) / y;
 }
 
+/* Reboot the machine.  */
+void EXPORT_FUNC (grub_reboot) (void);
+
+#ifdef GRUB_MACHINE_PCBIOS
+/* Halt the system, using APM if possible. If NO_APM is true, don't
+ * use APM even if it is available.  */
+void EXPORT_FUNC (grub_halt) (int no_apm);
+#else
+void EXPORT_FUNC (grub_halt) (void);
+#endif
+
 #endif /* ! GRUB_MISC_HEADER */
index 917e1548fc4ddc1d6239a660744978eb034426e1..a76c2a4dfe792bba7b646baf8b1e118d9f1d95f4 100644 (file)
@@ -23,9 +23,6 @@
 
 #ifndef ASM_FILE
 
-void EXPORT_FUNC (grub_reboot) (void);
-void EXPORT_FUNC (grub_halt) (void);
-
 /* The prefix which points to the directory where GRUB modules and its
    configuration file are located.  */
 extern char grub_prefix[];
index 03a63149297ae25f8b63216960895d7f6dc97e0e..e63e1f6162a08d7bfeda11796eac5526048c3116 100644 (file)
@@ -54,9 +54,6 @@ extern grub_int32_t grub_total_module_size;
    configuration file are located.  */
 extern char grub_prefix[];
 
-void EXPORT_FUNC (grub_reboot) (void);
-void EXPORT_FUNC (grub_halt) (void);
-
 #endif /* ! ASM_FILE */
 
 #endif /* ! GRUB_KERNEL_MACHINE_HEADER */
index 2f00435395d0fd5e853adef1613560de82e4e0a7..10805e42b325e7c876a989121bc92d471b2b03d7 100644 (file)
@@ -17,7 +17,6 @@
  */
 
 #include <grub/cpu/io.h>
-#include <grub/cpu/halt.h>
 #include <grub/machine/init.h>
 #include <grub/misc.h>