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
This commit is contained in:
21
init/init_shared.c
Normal file
21
init/init_shared.c
Normal file
@ -0,0 +1,21 @@
|
||||
#include <signal.h>
|
||||
#include "busybox.h"
|
||||
|
||||
#include "init_shared.h"
|
||||
|
||||
|
||||
extern int kill_init(int sig)
|
||||
{
|
||||
#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, sig));
|
||||
#else
|
||||
return(kill(1, sig));
|
||||
#endif
|
||||
}
|
Reference in New Issue
Block a user