summaryrefslogtreecommitdiffstats
path: root/src/interface
diff options
context:
space:
mode:
authorMichael Brown2013-03-22 14:54:44 +0100
committerMichael Brown2013-03-22 14:54:44 +0100
commite68a6ca225115a8796e6d63ffc32856043e25886 (patch)
tree3bb58a45adbf41533d910482618b2ea306e4cb2c /src/interface
parent[efi] Add "reboot" command for EFI (diff)
downloadipxe-e68a6ca225115a8796e6d63ffc32856043e25886.tar.gz
ipxe-e68a6ca225115a8796e6d63ffc32856043e25886.tar.xz
ipxe-e68a6ca225115a8796e6d63ffc32856043e25886.zip
[cmdline] Add ability to perform a warm reboot
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/interface')
-rw-r--r--src/interface/efi/efi_reboot.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/interface/efi/efi_reboot.c b/src/interface/efi/efi_reboot.c
index 1ecccc460..bfee36aa3 100644
--- a/src/interface/efi/efi_reboot.c
+++ b/src/interface/efi/efi_reboot.c
@@ -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 );