diff options
author | Marin Hannache <git@mareo.fr> | 2013-07-13 14:31:15 +0200 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2013-07-15 13:49:48 +0200 |
commit | c0af8c04333e499d2ed91dcb98b2dfe1aec1c7e3 (patch) | |
tree | dd91fb9d367e5e2ff16425b9e0b75d218e8a63a3 /src/core/null_reboot.c | |
parent | 9b93b669d13611763470f190954cbb711448f749 (diff) | |
download | ipxe-c0af8c04333e499d2ed91dcb98b2dfe1aec1c7e3.tar.gz |
[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.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/null_reboot.c b/src/core/null_reboot.c index 8e3ed0bb6..a3d5b2ef8 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 ); |