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
33 }; 33 };
34 static const smallint signals[] = { SIGUSR1, SIGUSR2, SIGTERM }; 34 static const smallint signals[] = { SIGUSR1, SIGUSR2, SIGTERM };
35 35
36 char *delay; 36 int delay = 0;
37 int which, flags, rc = 1; 37 int which, flags, rc = 1;
38#if ENABLE_FEATURE_WTMP 38#if ENABLE_FEATURE_WTMP
39 struct utmp utmp; 39 struct utmp utmp;
@@ -46,9 +46,10 @@ RB_AUTOBOOT
46 continue; 46 continue;
47 47
48 /* Parse and handle arguments */ 48 /* Parse and handle arguments */
49 opt_complementary = "d+"; /* -d N */
49 flags = getopt32(argv, "d:nfw", &delay); 50 flags = getopt32(argv, "d:nfw", &delay);
50 if (flags & 1) 51
51 sleep(xatou(delay)); 52 sleep(delay);
52 53
53#if ENABLE_FEATURE_WTMP 54#if ENABLE_FEATURE_WTMP
54 if (access(bb_path_wtmp_file, R_OK|W_OK) == -1) { 55 if (access(bb_path_wtmp_file, R_OK|W_OK) == -1) {