From c0af8c04333e499d2ed91dcb98b2dfe1aec1c7e3 Mon Sep 17 00:00:00 2001 From: Marin Hannache Date: Sat, 13 Jul 2013 14:31:15 +0200 Subject: [cmdline] Add "poweroff" command Modified-by: Michael Brown Signed-off-by: Marin Hannache Signed-off-by: Michael Brown --- src/include/ipxe/errfile.h | 2 ++ src/include/ipxe/reboot.h | 10 ++++++++++ 2 files changed, 12 insertions(+) (limited to 'src/include') diff --git a/src/include/ipxe/errfile.h b/src/include/ipxe/errfile.h index c6b0e794a..aad3f358b 100644 --- a/src/include/ipxe/errfile.h +++ b/src/include/ipxe/errfile.h @@ -63,6 +63,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #define ERRFILE_test ( ERRFILE_CORE | 0x00170000 ) #define ERRFILE_xferbuf ( ERRFILE_CORE | 0x00180000 ) #define ERRFILE_pending ( ERRFILE_CORE | 0x00190000 ) +#define ERRFILE_null_reboot ( ERRFILE_CORE | 0x001a0000 ) #define ERRFILE_eisa ( ERRFILE_DRIVER | 0x00000000 ) #define ERRFILE_isa ( ERRFILE_DRIVER | 0x00010000 ) @@ -277,6 +278,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #define ERRFILE_efi_umalloc ( ERRFILE_OTHER | 0x003b0000 ) #define ERRFILE_linux_pci ( ERRFILE_OTHER | 0x003c0000 ) #define ERRFILE_pci_settings ( ERRFILE_OTHER | 0x003d0000 ) +#define ERRFILE_efi_reboot ( ERRFILE_OTHER | 0x003e0000 ) /** @} */ diff --git a/src/include/ipxe/reboot.h b/src/include/ipxe/reboot.h index 5d882d3dd..97e0d5fb6 100644 --- a/src/include/ipxe/reboot.h +++ b/src/include/ipxe/reboot.h @@ -55,4 +55,14 @@ FILE_LICENCE ( GPL2_OR_LATER ); */ void reboot ( int warm ); +/** + * Power off system + * + * @ret rc Return status code + * + * This function may fail, since not all systems support being powered + * off by software. + */ +int poweroff ( void ); + #endif /* _IPXE_REBOOT_H */ -- cgit v1.2.3-55-g7522