mostly formatting
This commit is contained in:
parent
544819c936
commit
85378253f3
9
init.c
9
init.c
@ -574,11 +574,9 @@ int main(int argc, char **argv)
|
||||
|
||||
/* Check for given init */
|
||||
init = get_from_env("INIT", myenv);
|
||||
if ( init && ! stat(init, &ist) && S_ISREG(ist.st_mode))
|
||||
argv[0] = init;
|
||||
else if ( ! stat(STAGE2_BINNAME, &ist) && S_ISREG(ist.st_mode))
|
||||
argv[0] = STAGE2_BINNAME;
|
||||
else
|
||||
if (init == NULL) init = STAGE2_BINNAME;
|
||||
|
||||
if (stat(init, &ist) || !S_ISREG(ist.st_mode) || !(ist.st_mode & S_IXUSR))
|
||||
fatal("can't find init on root fs");
|
||||
|
||||
/* Spawn init */
|
||||
@ -587,6 +585,7 @@ int main(int argc, char **argv)
|
||||
/* unblock signals */
|
||||
sigprocmask(SIG_UNBLOCK, &sig, NULL);
|
||||
|
||||
argv[0] = init;
|
||||
execve(argv[0], argv, myenv);
|
||||
fatal("stage2"); /* Failed to spawn init */
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user