projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some more patchelttes from Larry Doolittle.
[oweals/busybox.git]
/
coreutils
/
sleep.c
diff --git
a/coreutils/sleep.c
b/coreutils/sleep.c
index 13f07c02feab2990cb1b601109e756f9d9486e23..3bcab88ee776469f8cdaab7e9180d5672acceaa4 100644
(file)
--- a/
coreutils/sleep.c
+++ b/
coreutils/sleep.c
@@
-21,24
+21,18
@@
*
*/
*
*/
-#include "internal.h"
#include <stdio.h>
#include <stdio.h>
-
-const char sleep_usage[] = "sleep N\n"
-#ifndef BB_FEATURE_TRIVIAL_HELP
- "\nPause for N seconds.\n"
-#endif
- ;
+#include <unistd.h>
+#include <stdlib.h>
+#include "busybox.h"
extern int sleep_main(int argc, char **argv)
{
if ((argc < 2) || (**(argv + 1) == '-')) {
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;
}
}