diff options
author | Eric Andersen | 2001-02-14 21:23:06 +0000 |
---|---|---|
committer | Eric Andersen | 2001-02-14 21:23:06 +0000 |
commit | 67991cf824f8df27e74c92d754fb507681c69ce6 (patch) | |
tree | a0b652f3dc794d1050c1a8de3afb014a621238fa /miscutils | |
parent | 68be2ab914e1e20fe666bbd22a89a18714be2789 (diff) | |
download | busybox-67991cf824f8df27e74c92d754fb507681c69ce6.zip busybox-67991cf824f8df27e74c92d754fb507681c69ce6.tar.gz |
This patch, put together by Manuel Novoa III, is a merge of work
done by Evin Robertson (bug#1105) and work from Manuel to make
usage messages occupy less space and simplify how usage messages
are displayed.
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/dc.c | 2 | ||||
-rw-r--r-- | miscutils/dutmp.c | 4 | ||||
-rw-r--r-- | miscutils/makedevs.c | 4 | ||||
-rw-r--r-- | miscutils/mktemp.c | 2 | ||||
-rw-r--r-- | miscutils/mt.c | 4 | ||||
-rw-r--r-- | miscutils/readlink.c | 2 | ||||
-rw-r--r-- | miscutils/update.c | 2 | ||||
-rw-r--r-- | miscutils/watchdog.c | 2 |
8 files changed, 11 insertions, 11 deletions
diff --git a/miscutils/dc.c b/miscutils/dc.c index 122673a..1e34574 100644 --- a/miscutils/dc.c +++ b/miscutils/dc.c @@ -169,7 +169,7 @@ int dc_main(int argc, char **argv) } } else { if (*argv[1]=='-') - usage(dc_usage); + show_usage(); while (argc >= 2) { stack_machine(argv[1]); argv++; diff --git a/miscutils/dutmp.c b/miscutils/dutmp.c index 7e1d2ee..2e6b3c0 100644 --- a/miscutils/dutmp.c +++ b/miscutils/dutmp.c @@ -33,7 +33,7 @@ extern int dutmp_main(int argc, char **argv) if (argc<2) { file = fileno(stdin); } else if (*argv[1] == '-' ) { - usage(dutmp_usage); + show_usage(); } else { file = open(argv[1], O_RDONLY); if (file < 0) { @@ -45,7 +45,7 @@ extern int dutmp_main(int argc, char **argv) * fact the stupid libc doesn't have a reliable #define to announce that libc5 * is being used. sigh. */ -#if ! defined __GLIBC__ +#if ! defined __GLIBC__ || defined __UCLIBC__ while (read(file, (void*)&ut, sizeof(struct utmp))) { printf("%d|%d|%s|%s|%s|%s|%s|%lx\n", ut.ut_type, ut.ut_pid, ut.ut_line, diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c index f979871..eed3968 100644 --- a/miscutils/makedevs.c +++ b/miscutils/makedevs.c @@ -32,7 +32,7 @@ int makedevs_main(int argc, char **argv) char buf[255]; if (argc < 7 || *argv[1]=='-') - usage(makedevs_usage); + show_usage(); switch (type[0]) { case 'c': @@ -45,7 +45,7 @@ int makedevs_main(int argc, char **argv) mode = S_IFIFO; break; default: - usage(makedevs_usage); + show_usage(); } mode |= 0660; diff --git a/miscutils/mktemp.c b/miscutils/mktemp.c index 3b9f2b2..b352202 100644 --- a/miscutils/mktemp.c +++ b/miscutils/mktemp.c @@ -31,7 +31,7 @@ extern int mktemp_main(int argc, char **argv) { if (argc != 2 && (argc != 3 || strcmp(argv[1], "-q"))) - usage(mktemp_usage); + show_usage(); if(mkstemp(argv[argc-1]) < 0) return EXIT_FAILURE; (void) puts(argv[argc-1]); diff --git a/miscutils/mt.c b/miscutils/mt.c index 683804b..eb93cb2 100644 --- a/miscutils/mt.c +++ b/miscutils/mt.c @@ -57,12 +57,12 @@ extern int mt_main(int argc, char **argv) int fd; if (argc < 2) { - usage(mt_usage); + show_usage(); } if (strcmp(argv[1], "-f") == 0) { if (argc < 4) { - usage(mt_usage); + show_usage(); } file = argv[2]; argv += 2; diff --git a/miscutils/readlink.c b/miscutils/readlink.c index 57f43d1..c82f640 100644 --- a/miscutils/readlink.c +++ b/miscutils/readlink.c @@ -33,7 +33,7 @@ int readlink_main(int argc, char **argv) int bufsize = 128, size = 128; if (argc != 2) - usage(readlink_usage); + show_usage(); while (bufsize < size + 1) { bufsize *= 2; diff --git a/miscutils/update.c b/miscutils/update.c index 309ce0c..2cf4a98 100644 --- a/miscutils/update.c +++ b/miscutils/update.c @@ -64,7 +64,7 @@ extern int update_main(int argc, char **argv) flush_duration = atoi(optarg); break; default: - usage(update_usage); + show_usage(); } } diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c index 7026cc0..65d0fc3 100644 --- a/miscutils/watchdog.c +++ b/miscutils/watchdog.c @@ -31,7 +31,7 @@ extern int watchdog_main(int argc, char **argv) int fd; if (argc != 2) { - usage(watchdog_usage); + show_usage(); } if ((fd=open(argv[1], O_WRONLY)) == -1) { |