aboutsummaryrefslogtreecommitdiff
path: root/init/halt.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/halt.c')
-rw-r--r--init/halt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/init/halt.c b/init/halt.c
index 1f0fae302..c14f0f221 100644
--- a/init/halt.c
+++ b/init/halt.c
@@ -33,7 +33,7 @@ RB_AUTOBOOT
};
static const smallint signals[] = { SIGUSR1, SIGUSR2, SIGTERM };
- char *delay;
+ int delay = 0;
int which, flags, rc = 1;
#if ENABLE_FEATURE_WTMP
struct utmp utmp;
@@ -46,9 +46,10 @@ RB_AUTOBOOT
continue;
/* Parse and handle arguments */
+ opt_complementary = "d+"; /* -d N */
flags = getopt32(argv, "d:nfw", &delay);
- if (flags & 1)
- sleep(xatou(delay));
+
+ sleep(delay);
#if ENABLE_FEATURE_WTMP
if (access(bb_path_wtmp_file, R_OK|W_OK) == -1) {