2008-02-12 Alexandre Boeglin <alex@boeglin.org>
* conf/i386-efi.rmk (grub_emu_SOURCES): Replace commands/i386/pc/halt.c and reboot.c by commands/halt.c and reboot.c. (grub_install_SOURCES): Add halt.mod and reboot.mod. (halt_mod_SOURCES): New variable. (halt_mod_CFLAGS): Likewise. (halt_mod_LDFLAGS): Likewise. (reboot_mod_SOURCES): Likewise. (reboot_mod_CFLAGS): Likewise. (reboot_mod_LDFLAGS): Likewise. * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace commands/ieee1275/halt.c and reboot.c by commands/halt.c and reboot.c. (halt_mod_SOURCES): Likewise. (reboot_mod_SOURCES): Likewise. * conf/i386-pc.rmk (grub_emu_SOURCES): Replace commands/i386/pc/reboot.c by commands/reboot.c. (reboot_mod_SOURCES): Likewise. * commands/i386/pc/reboot.c: merge this file ... * commands/ieee1275/reboot.c: ... and this file ... * commands/reboot.c: ... to this file. Add some precompiler directive to include the correct header for each machine. * commands/ieee1275/halt.c: move this file ... * commands/halt.c: ... to here. Add some precompiler directive to include the correct header for each machine. * include/grub/efi/efi.h (grub_reboot): New function declaration. (grub_halt): Likewise. * kern/efi/efi.c (grub_reboot): New function. (grub_halt): Likewise.
This commit is contained in:
parent
c74493e01f
commit
f714229e34
9 changed files with 97 additions and 62 deletions
|
@ -1,7 +1,7 @@
|
|||
/* efi.c - generic EFI support */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2006,2007 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2006,2007,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
|
||||
|
@ -162,6 +162,22 @@ grub_exit (void)
|
|||
0, 0);
|
||||
}
|
||||
|
||||
void
|
||||
grub_reboot (void)
|
||||
{
|
||||
grub_efi_fini ();
|
||||
grub_efi_system_table->runtime_services->
|
||||
reset_system (GRUB_EFI_RESET_COLD, GRUB_EFI_SUCCESS, 0, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
grub_halt (void)
|
||||
{
|
||||
grub_efi_fini ();
|
||||
grub_efi_system_table->runtime_services->
|
||||
reset_system (GRUB_EFI_RESET_SHUTDOWN, GRUB_EFI_SUCCESS, 0, NULL);
|
||||
}
|
||||
|
||||
int
|
||||
grub_efi_exit_boot_services (grub_efi_uintn_t map_key)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue