diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-06-27 17:08:15 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-06-27 17:08:15 +0000 |
commit | b01ed65ad2e46fc7747010b16e53b3a9e1a7c23a (patch) | |
tree | 2988261cdc1078ca34f71822d101aab5b482df43 /init/halt.c | |
parent | 0b0d393347a2f4444a49afa32491068ac92cbfa3 (diff) | |
download | busybox-w32-b01ed65ad2e46fc7747010b16e53b3a9e1a7c23a.tar.gz busybox-w32-b01ed65ad2e46fc7747010b16e53b3a9e1a7c23a.tar.bz2 busybox-w32-b01ed65ad2e46fc7747010b16e53b3a9e1a7c23a.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
Diffstat (limited to 'init/halt.c')
-rw-r--r-- | init/halt.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/init/halt.c b/init/halt.c index 7e663227c..b9eeaebdd 100644 --- a/init/halt.c +++ b/init/halt.c | |||
@@ -23,19 +23,10 @@ | |||
23 | 23 | ||
24 | #include "busybox.h" | 24 | #include "busybox.h" |
25 | #include <signal.h> | 25 | #include <signal.h> |
26 | #include "init_shared.h" | ||
27 | |||
26 | 28 | ||
27 | extern int halt_main(int argc, char **argv) | 29 | extern int halt_main(int argc, char **argv) |
28 | { | 30 | { |
29 | #ifdef CONFIG_FEATURE_INITRD | 31 | return kill_init(SIGUSR1); |
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, SIGUSR1)); | ||
38 | #else | ||
39 | return(kill(1, SIGUSR1)); | ||
40 | #endif | ||
41 | } | 32 | } |