mostly formatting

This commit is contained in:
Sergey Bolshakov 2009-07-06 19:22:03 +04:00
parent 544819c936
commit 85378253f3
2 changed files with 5 additions and 6 deletions

9
init.c
View File

@ -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;

View File

@ -329,7 +329,7 @@ void stage1()
{
enum return_type ret;
char buf[128];
char * init;
char *init;
open_log();
getversion();