mirror of
https://github.com/ipxe/ipxe
synced 2025-12-19 19:49:45 +03:00
[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:
committed by
Michael Brown
parent
9b93b669d1
commit
c0af8c0433
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user