summaryrefslogtreecommitdiffstats
path: root/commands/poweroff.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-03-13 12:05:23 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2017-03-30 08:23:21 +0200
commitdc247478c67d663b6e3f5ce639e06b23b54e6aff (patch)
tree7414c9d540c5d4600d161cf0bb72ccbd0e3da564 /commands/poweroff.c
parent441e9f5a72b245b671118f3e771eb129834a7a34 (diff)
downloadbarebox-dc247478c67d663b6e3f5ce639e06b23b54e6aff.tar.gz
poweroff: Allow to register poweroff handlers
Allow to register handlers for poweroff. This allows to have multiple poweroff implementations in a single binary. The implementation is close to the restart handlers. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/poweroff.c')
-rw-r--r--commands/poweroff.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/commands/poweroff.c b/commands/poweroff.c
index e8c726a..bbafa13 100644
--- a/commands/poweroff.c
+++ b/commands/poweroff.c
@@ -19,10 +19,11 @@
#include <common.h>
#include <command.h>
+#include <poweroff.h>
static int cmd_poweroff(int argc, char *argv[])
{
- poweroff();
+ poweroff_machine();
/* Not reached */
return 1;