From b01ed65ad2e46fc7747010b16e53b3a9e1a7c23a Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 27 Jun 2003 17:08:15 +0000 Subject: Apply last_patch93 from vodz: andersen@busybox.net wrote: >Message: 4 >Modified Files: > init.c >Log Message: >Remove code for unsupported kernel versions Hmm. Current init.c have check >= 2.2.0 kernel one time too. Ok. Last patch removed this point and move common init code to new file for /init dir --- init/poweroff.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'init/poweroff.c') diff --git a/init/poweroff.c b/init/poweroff.c index aca6e2f25..d78ff4f98 100644 --- a/init/poweroff.c +++ b/init/poweroff.c @@ -26,16 +26,5 @@ extern int poweroff_main(int argc, char **argv) { -#ifdef CONFIG_FEATURE_INITRD - /* don't assume init's pid == 1 */ - long *pid = find_pid_by_name("init"); - if (!pid || *pid<=0) { - pid = find_pid_by_name("linuxrc"); - if (!pid || *pid<=0) - bb_error_msg_and_die("no process killed"); - } - return(kill(*pid, SIGUSR2)); -#else - return(kill(1, SIGUSR2)); -#endif + return kill_init(SIGUSR2); } -- cgit v1.2.3