From 714674e4da3d92c5dd14e00ab30794a895b91eb4 Mon Sep 17 00:00:00 2001 From: Jeremie Koenig Date: Thu, 27 May 2010 15:38:44 +0200 Subject: init,halt: portability improvements * make init and halt use the same RB_* constants for reboot() * conditionalize the Linux-specific code Inspired by init.init.diff from the Debian kFreeBSD patches at: http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/busybox/1.14/debian Signed-off-by: Jeremie Koenig Signed-off-by: Denys Vlasenko --- init/halt.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'init/halt.c') diff --git a/init/halt.c b/init/halt.c index f1bb2c4a8..abd801fda 100644 --- a/init/halt.c +++ b/init/halt.c @@ -8,7 +8,7 @@ */ #include "libbb.h" -#include +#include "reboot.h" #if ENABLE_FEATURE_WTMP #include @@ -36,18 +36,6 @@ static void write_wtmp(void) #define write_wtmp() ((void)0) #endif -#ifndef RB_HALT_SYSTEM -#define RB_HALT_SYSTEM RB_HALT -#endif - -#ifndef RB_POWERDOWN -/* Stop system and switch power off if possible. */ -# define RB_POWERDOWN 0x4321fedc -#endif -#ifndef RB_POWER_OFF -# define RB_POWER_OFF RB_POWERDOWN -#endif - int halt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; int halt_main(int argc UNUSED_PARAM, char **argv) -- cgit v1.2.3