- pass thru argv to next init
- fixed typo in message
This commit is contained in:
parent
21bb48d698
commit
795cdae5d7
6
init.c
6
init.c
@ -384,7 +384,6 @@ int main(int argc, char **argv)
|
|||||||
struct stat rst, cst, ist;
|
struct stat rst, cst, ist;
|
||||||
struct statfs sfs;
|
struct statfs sfs;
|
||||||
pid_t installpid, childpid;
|
pid_t installpid, childpid;
|
||||||
char * stage2_argv[] = {STAGE2_BINNAME, NULL};
|
|
||||||
int wait_status;
|
int wait_status;
|
||||||
int fd;
|
int fd;
|
||||||
int fds[2];
|
int fds[2];
|
||||||
@ -555,13 +554,14 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Check for given init */
|
/* Check for given init */
|
||||||
if (stat(stage2_argv[0], &ist) || !S_ISREG(ist.st_mode))
|
if (stat(STAGE2_BINNAME, &ist) || !S_ISREG(ist.st_mode))
|
||||||
fatal_error("can't find init on root fs");
|
fatal_error("can't find init on root fs");
|
||||||
|
|
||||||
/* Spawn init */
|
/* Spawn init */
|
||||||
printf(" done.\n");
|
printf(" done.\n");
|
||||||
|
|
||||||
execve(stage2_argv[0], stage2_argv, myenv);
|
argv[0] = STAGE2_BINNAME;
|
||||||
|
execve(argv[0], argv, myenv);
|
||||||
fatal_error("stage2"); /* Failed to spawn init */
|
fatal_error("stage2"); /* Failed to spawn init */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -297,7 +297,7 @@ static void pci_probe(enum driver_type type)
|
|||||||
#ifndef DISABLE_MEDIAS
|
#ifndef DISABLE_MEDIAS
|
||||||
if (!matched && type == IDE_ADAPTERS) {
|
if (!matched && type == IDE_ADAPTERS) {
|
||||||
/* probe ide-generic as last resort */
|
/* probe ide-generic as last resort */
|
||||||
log_message("(guess) module is \"pci-generic\"");
|
log_message("(guess) module is \"ide-generic\"");
|
||||||
int wait_msg = 0;
|
int wait_msg = 0;
|
||||||
enum insmod_return failed;
|
enum insmod_return failed;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user