summaryrefslogtreecommitdiffstats
path: root/src/core/null_reboot.c
diff options
context:
space:
mode:
authorMarin Hannache2013-07-13 14:31:15 +0200
committerMichael Brown2013-07-15 13:49:48 +0200
commitc0af8c04333e499d2ed91dcb98b2dfe1aec1c7e3 (patch)
treedd91fb9d367e5e2ff16425b9e0b75d218e8a63a3 /src/core/null_reboot.c
parent[legal] Add missing FILE_LICENCE declarations (diff)
downloadipxe-c0af8c04333e499d2ed91dcb98b2dfe1aec1c7e3.tar.gz
ipxe-c0af8c04333e499d2ed91dcb98b2dfe1aec1c7e3.tar.xz
ipxe-c0af8c04333e499d2ed91dcb98b2dfe1aec1c7e3.zip
[cmdline] Add "poweroff" command
Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Marin Hannache <git@mareo.fr> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/core/null_reboot.c')
-rw-r--r--src/core/null_reboot.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/null_reboot.c b/src/core/null_reboot.c
index 8e3ed0bb..a3d5b2ef 100644
--- a/src/core/null_reboot.c
+++ b/src/core/null_reboot.c
@@ -27,6 +27,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
*/
#include <stdio.h>
+#include <errno.h>
#include <ipxe/reboot.h>
/**
@@ -40,4 +41,15 @@ static void null_reboot ( int warm __unused ) {
while ( 1 ) {}
}
+/**
+ * Power off system
+ *
+ * @ret rc Return status code
+ */
+static int null_poweroff ( void ) {
+
+ return -ENOTSUP;
+}
+
PROVIDE_REBOOT ( null, reboot, null_reboot );
+PROVIDE_REBOOT ( null, poweroff, null_poweroff );