[OpenWrt-Devel] [PATCH procd 8/8] Fix 'reboot' message when the system is powering down

Michel Stam m.stam at fugro.nl
Thu Oct 2 08:56:23 EDT 2014


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 at fugro.nl>
---
 state.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/state.c b/state.c
index 2268de3..c31f6a8 100644
--- a/state.c
+++ b/state.c
@@ -98,7 +98,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);
-- 
1.7.12.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list