diff options
author | Antony Pavlov <antonynpavlov@gmail.com> | 2018-01-22 13:01:31 +0300 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-01-25 08:13:47 +0100 |
commit | 38984530b741b1421815e432f92e49f33564ec4a (patch) | |
tree | 3fae644cb65ea5f56deff70b93e6a583341fabb6 /arch/sandbox/board/poweroff.c | |
parent | 7c74d60baed1deb3b23ed13c184344b59348dc15 (diff) | |
download | barebox-38984530b741b1421815e432f92e49f33564ec4a.tar.gz barebox-38984530b741b1421815e432f92e49f33564ec4a.tar.xz |
sandbox: use 'poweroff' command for exit
The 'poweroff' command is more appropriate for exit
barebox than 'reset'.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/sandbox/board/poweroff.c')
-rw-r--r-- | arch/sandbox/board/poweroff.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/sandbox/board/poweroff.c b/arch/sandbox/board/poweroff.c new file mode 100644 index 0000000000..6b5a6dff15 --- /dev/null +++ b/arch/sandbox/board/poweroff.c @@ -0,0 +1,17 @@ +#include <common.h> +#include <init.h> +#include <poweroff.h> +#include <mach/linux.h> + +static void sandbox_poweroff(struct poweroff_handler *poweroff) +{ + linux_exit(); +} + +static int poweroff_register_feature(void) +{ + poweroff_handler_register_fn(sandbox_poweroff); + + return 0; +} +coredevice_initcall(poweroff_register_feature); |