diff options
| author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-06-27 17:08:15 +0000 |
|---|---|---|
| committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-06-27 17:08:15 +0000 |
| commit | 2734533491d99fc7628492f88f560c0f08ccdafe (patch) | |
| tree | 2988261cdc1078ca34f71822d101aab5b482df43 /init/init_shared.c | |
| parent | 0196e2600734d0c1deb4807b0d545a562537bc80 (diff) | |
| download | busybox-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/init_shared.c')
| -rw-r--r-- | init/init_shared.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/init/init_shared.c b/init/init_shared.c new file mode 100644 index 000000000..842942fe3 --- /dev/null +++ b/init/init_shared.c | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | #include <signal.h> | ||
| 2 | #include "busybox.h" | ||
| 3 | |||
| 4 | #include "init_shared.h" | ||
| 5 | |||
| 6 | |||
| 7 | extern int kill_init(int sig) | ||
| 8 | { | ||
| 9 | #ifdef CONFIG_FEATURE_INITRD | ||
| 10 | /* don't assume init's pid == 1 */ | ||
| 11 | long *pid = find_pid_by_name("init"); | ||
| 12 | if (!pid || *pid<=0) { | ||
| 13 | pid = find_pid_by_name("linuxrc"); | ||
| 14 | if (!pid || *pid<=0) | ||
| 15 | bb_error_msg_and_die("no process killed"); | ||
| 16 | } | ||
| 17 | return(kill(*pid, sig)); | ||
| 18 | #else | ||
| 19 | return(kill(1, sig)); | ||
| 20 | #endif | ||
| 21 | } | ||
