+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,
#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)),
*/
#include <grub/dl.h>
-#include <grub/machine/init.h>
+#include <grub/misc.h>
#include <grub/extcmd.h>
static const struct grub_arg_option options[] =
#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)),
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 \
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)
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 \
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)
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)
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);
+++ /dev/null
-/*
- * 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);
/* 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 */
+++ /dev/null
-/*
- * 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);
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 */
#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[];
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 */
*/
#include <grub/cpu/io.h>
-#include <grub/cpu/halt.h>
#include <grub/machine/init.h>
#include <grub/misc.h>