mirror of
https://github.com/ipxe/ipxe
synced 2025-12-16 17:41:18 +03:00
[cmdline] Add ability to perform a warm reboot
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user