Fix 'reboot' message when the system is powering down
authorMichel Stam <m.stam@fugro.nl>
Thu, 2 Oct 2014 11:56:23 +0000 (11:56 +0000)
committerJohn Crispin <blogic@openwrt.org>
Thu, 2 Oct 2014 17:20:30 +0000 (19:20 +0200)
While executing a system halt (via the powerbutton or otherwise),
the system displays rebooting, whereas it should display that
it is going to turn off.

Signed-off-by: Michel Stam <m.stam@fugro.nl>
state.c

diff --git a/state.c b/state.c
index c3d2303329f87ae5204619ba150e07770209b538..c5d90b6718106d614b28fcf5ac788f68135c6e0e 100644 (file)
--- a/state.c
+++ b/state.c
@@ -85,7 +85,10 @@ static void state_enter(void)
                kill(-1, SIGKILL);
                sync();
                sleep(1);
-               LOG("- reboot -\n");
+               if (reboot_event == RB_POWER_OFF)
+                       LOG("- power down -\n");
+               else
+                       LOG("- reboot -\n");
 
                /* Allow time for last message to reach serial console, etc */
                sleep(1);