[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>
This commit is contained in:
Marin Hannache
2013-07-13 14:31:15 +02:00
committed by Michael Brown
parent 9b93b669d1
commit c0af8c0433
9 changed files with 226 additions and 0 deletions

View File

@@ -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 );