[cmdline] Add ability to perform a warm reboot

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2013-03-22 13:54:44 +00:00
parent 71cd508838
commit e68a6ca225
6 changed files with 28 additions and 9 deletions

View File

@@ -32,12 +32,13 @@ FILE_LICENCE ( GPL2_OR_LATER );
/**
* Reboot system
*
* @v warm Perform a warm reboot
*/
static void efi_reboot ( void ) {
static void efi_reboot ( int warm ) {
EFI_RUNTIME_SERVICES *rs = efi_systab->RuntimeServices;
/* Use runtime services to reset system */
rs->ResetSystem ( EfiResetCold, 0, 0, NULL );
rs->ResetSystem ( ( warm ? EfiResetWarm : EfiResetCold ), 0, 0, NULL );
}
PROVIDE_REBOOT ( efi, reboot, efi_reboot );