aboutsummaryrefslogtreecommitdiff
path: root/init/poweroff.c
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-06-27 17:08:15 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-06-27 17:08:15 +0000
commit2734533491d99fc7628492f88f560c0f08ccdafe (patch)
tree2988261cdc1078ca34f71822d101aab5b482df43 /init/poweroff.c
parent0196e2600734d0c1deb4807b0d545a562537bc80 (diff)
downloadbusybox-w32-2734533491d99fc7628492f88f560c0f08ccdafe.tar.gz
busybox-w32-2734533491d99fc7628492f88f560c0f08ccdafe.tar.bz2
busybox-w32-2734533491d99fc7628492f88f560c0f08ccdafe.zip
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 git-svn-id: svn://busybox.net/trunk/busybox@7008 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'init/poweroff.c')
-rw-r--r--init/poweroff.c13
1 files changed, 1 insertions, 12 deletions
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 @@
26 26
27extern int poweroff_main(int argc, char **argv) 27extern int poweroff_main(int argc, char **argv)
28{ 28{
29#ifdef CONFIG_FEATURE_INITRD 29 return kill_init(SIGUSR2);
30 /* don't assume init's pid == 1 */
31 long *pid = find_pid_by_name("init");
32 if (!pid || *pid<=0) {
33 pid = find_pid_by_name("linuxrc");
34 if (!pid || *pid<=0)
35 bb_error_msg_and_die("no process killed");
36 }
37 return(kill(*pid, SIGUSR2));
38#else
39 return(kill(1, SIGUSR2));
40#endif
41} 30}