X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=coreutils%2Fsleep.c;h=3bcab88ee776469f8cdaab7e9180d5672acceaa4;hb=8b7a0d807a3ec8cfcbc4e4cb3067237b438bae14;hp=13f07c02feab2990cb1b601109e756f9d9486e23;hpb=7ab9c7ee52db8759d457819f5480378fa3aa97cc;p=oweals%2Fbusybox.git diff --git a/coreutils/sleep.c b/coreutils/sleep.c index 13f07c02f..3bcab88ee 100644 --- a/coreutils/sleep.c +++ b/coreutils/sleep.c @@ -21,24 +21,18 @@ * */ -#include "internal.h" #include - -const char sleep_usage[] = "sleep N\n" -#ifndef BB_FEATURE_TRIVIAL_HELP - "\nPause for N seconds.\n" -#endif - ; +#include +#include +#include "busybox.h" extern int sleep_main(int argc, char **argv) { if ((argc < 2) || (**(argv + 1) == '-')) { - usage(sleep_usage); + show_usage(); } - if (sleep(atoi(*(++argv))) != 0) { - perror("sleep"); - exit(FALSE); - } else - exit(TRUE); + if (sleep(atoi(*(++argv))) != 0) + perror_msg_and_die("sleep"); + return EXIT_SUCCESS; }