aboutsummaryrefslogtreecommitdiff
path: root/sleep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sleep.c')
-rw-r--r--sleep.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/sleep.c b/sleep.c
index bfbb78f61..9687b8446 100644
--- a/sleep.c
+++ b/sleep.c
@@ -1,3 +1,4 @@
1/* vi: set sw=4 ts=4: */
1/* 2/*
2 * Mini sleep implementation for busybox 3 * Mini sleep implementation for busybox
3 * 4 *
@@ -23,19 +24,17 @@
23#include "internal.h" 24#include "internal.h"
24#include <stdio.h> 25#include <stdio.h>
25 26
26const char sleep_usage[] = "sleep N\n\n" 27const char sleep_usage[] = "sleep N\n\n" "Pause for N seconds.\n";
27"Pause for N seconds.\n";
28 28
29extern int 29extern int sleep_main(int argc, char **argv)
30sleep_main(int argc, char * * argv)
31{ 30{
32 if ( (argc < 2) || (**(argv+1) == '-') ) { 31 if ((argc < 2) || (**(argv + 1) == '-')) {
33 usage( sleep_usage ); 32 usage(sleep_usage);
34 } 33 }
35 34
36 if ( sleep(atoi(*(++argv))) != 0 ) { 35 if (sleep(atoi(*(++argv))) != 0) {
37 perror( "sleep"); 36 perror("sleep");
38 exit (FALSE); 37 exit(FALSE);
39 } else 38 } else
40 exit (TRUE); 39 exit(TRUE);
41} 40}