diff options
-rw-r--r-- | mdk-stage1/ka.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/mdk-stage1/ka.c b/mdk-stage1/ka.c index d3c98e2fc..62c7a9c82 100644 --- a/mdk-stage1/ka.c +++ b/mdk-stage1/ka.c @@ -43,15 +43,15 @@ static void my_pause(void) { static enum return_type ka_wait_for_stage2(void) { char * ramdisk = "/dev/ram3"; /* warning, verify that this file exists in the initrd*/ - char * ka_launch[] = { "/ka/ka-d-client", "-w","-s","getstage2","-e","(cd /tmp/stage2; tar --extract --read-full-records --same-permissions --numeric-o wner --sparse --file - )", NULL }; /* The command line for ka_launch */ + char * ka_launch[] = { "/ka/ka-d-client", "-w","-s","getstage2","-e","(cd /sysroot/tmp/stage2; tar --extract --read-full-records --same-permissions --numeric-owner --sparse --file - )", NULL }; /* The command line for ka_launch */ char * mkfs_launch[] = { "/sbin/mke2fs", ramdisk, NULL}; /* The mkfs command for formating the ramdisk */ log_message("KA: Preparing to receive stage 2...."); int pida, wait_status; if (!(pida = fork())) { /* Forking current process for running mkfs */ - // close(1); - // close(2); + close(1); + close(2); execv(mkfs_launch[0], mkfs_launch); /* Formating the ramdisk */ printf("KA: Can't execute %s\n<press Enter>\n", mkfs_launch[0]); my_pause(); @@ -74,9 +74,6 @@ static enum return_type ka_wait_for_stage2(void) fprintf(stderr, "%s: Failed to fork()\n", strerror(errno)); exit(13); } else if ( pid == 0 ) { - fprintf(stderr, "%s: Failed to fork()\n", strerror(errno)); - exit(13); - } else if ( pid == 0 ) { execv(ka_launch[0], ka_launch); } else { // wpid = wait(&status); /* Child's exit status */ |