summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/init.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/mdk-stage1/init.c b/mdk-stage1/init.c
index 24615704a..f774484d7 100644
--- a/mdk-stage1/init.c
+++ b/mdk-stage1/init.c
@@ -57,7 +57,6 @@ static inline long reboot(unsigned int command)
#endif
-#define BINARY "/sbin/stage1"
#define BINARY_STAGE2 "/usr/bin/runinstall2"
@@ -466,7 +465,6 @@ int main(int argc, char **argv)
pid_t installpid, childpid;
int wait_status;
int fd;
- int counter = 0;
int abnormal_termination = 0;
if (argc > 1 && argv[1][0] >= '0' && argv[1][0] <= '9') {
@@ -524,14 +522,12 @@ int main(int argc, char **argv)
do {
- if (counter == 1) {
- printf("proceeding, please wait...\n");
- }
+ printf("proceeding, please wait...\n");
if (!(installpid = fork())) {
/* child */
char * child_argv[2];
- child_argv[0] = counter == 0 ? BINARY : BINARY_STAGE2;
+ child_argv[0] = BINARY_STAGE2;
child_argv[1] = NULL;
execve(child_argv[0], child_argv, env);
@@ -542,8 +538,6 @@ int main(int argc, char **argv)
do {
childpid = wait4(-1, &wait_status, 0, NULL);
} while (childpid != installpid);
-
- counter++;
} while (WIFEXITED(wait_status) && WEXITSTATUS(wait_status) == exit_value_restart);
/* allow Ctrl Alt Del to reboot */