X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=coreutils%2Fsleep.c;h=3bcab88ee776469f8cdaab7e9180d5672acceaa4;hb=fccaa3629b89bcfcd2d9b4126255cd31e0f5e174;hp=9687b84460300917a26d743d0ce283d3992b81b5;hpb=e49d5ecbbe51718fa925b6890a735e5937cc2aa2;p=oweals%2Fbusybox.git diff --git a/coreutils/sleep.c b/coreutils/sleep.c index 9687b8446..3bcab88ee 100644 --- a/coreutils/sleep.c +++ b/coreutils/sleep.c @@ -21,20 +21,18 @@ * */ -#include "internal.h" #include - -const char sleep_usage[] = "sleep N\n\n" "Pause for N seconds.\n"; +#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; }