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 /archival | |
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 'archival')
-rw-r--r-- | archival/ar.c | 4 | ||||
-rw-r--r-- | archival/dpkg.c | 4 | ||||
-rw-r--r-- | archival/dpkg_deb.c | 6 | ||||
-rw-r--r-- | archival/gunzip.c | 4 | ||||
-rw-r--r-- | archival/gzip.c | 4 | ||||
-rw-r--r-- | archival/tar.c | 4 |
6 files changed, 12 insertions, 14 deletions
diff --git a/archival/ar.c b/archival/ar.c index 7a5169e..59f5181 100644 --- a/archival/ar.c +++ b/archival/ar.c @@ -163,13 +163,13 @@ extern int ar_main(int argc, char **argv) funct |= extract_to_file; break; default: - usage(ar_usage); + show_usage(); } } /* check the src filename was specified */ if (optind == argc) - usage(ar_usage); + show_usage(); if ( (srcFd = open(argv[optind], O_RDONLY)) < 0) error_msg_and_die("Cannot read %s", argv[optind]); diff --git a/archival/dpkg.c b/archival/dpkg.c index 4a5c6f4..6e309eb 100644 --- a/archival/dpkg.c +++ b/archival/dpkg.c @@ -840,7 +840,7 @@ extern int dpkg_main(int argc, char **argv) case 'c': return dpkg_configure(packages, status); default : - usage(dpkg_usage); + show_usage(); return EXIT_FAILURE; } -}
\ No newline at end of file +} diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c index aed0ba3..c084381 100644 --- a/archival/dpkg_deb.c +++ b/archival/dpkg_deb.c @@ -141,14 +141,12 @@ extern int dpkg_deb_main(int argc, char **argv) break; */ default: - usage(dpkg_deb_usage); - return EXIT_FAILURE; + show_usage(); } } if (((optind + 1 ) > argc) || (optflag == 0)) { - usage(dpkg_deb_usage); - return(EXIT_FAILURE); + show_usage(); } if ((optflag & dpkg_deb_control) || (optflag & dpkg_deb_extract) || (optflag & dpkg_deb_verbose_extract)) { if ( (optind + 1) == argc ) { diff --git a/archival/gunzip.c b/archival/gunzip.c index 48a4608..bf8812d 100644 --- a/archival/gunzip.c +++ b/archival/gunzip.c @@ -1250,7 +1250,7 @@ int gunzip_main(int argc, char **argv) force = 1; break; default: - usage(gunzip_usage); + show_usage(); } } } @@ -1275,7 +1275,7 @@ int gunzip_main(int argc, char **argv) } else { /* Open up the input file */ if (argc <= 0) - usage(gunzip_usage); + show_usage(); if (strlen(*argv) > MAX_PATH_LEN) { error_msg(name_too_long); exit(WARNING); diff --git a/archival/gzip.c b/archival/gzip.c index 75f3caa..3cbef4e 100644 --- a/archival/gzip.c +++ b/archival/gzip.c @@ -1812,7 +1812,7 @@ int gzip_main(int argc, char **argv) case 'd': exit(gunzip_main(argc, argv)); default: - usage(gzip_usage); + show_usage(); } } } @@ -1865,7 +1865,7 @@ int gzip_main(int argc, char **argv) } else { /* Open up the input file */ if (argc <= 0) - usage(gzip_usage); + show_usage(); strncpy(ifname, *argv, MAX_PATH_LEN); /* Open input file */ diff --git a/archival/tar.c b/archival/tar.c index fb0fcc6..62f1b1d 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -214,7 +214,7 @@ extern int tar_main(int argc, char **argv) int opt; if (argc <= 1) - usage(tar_usage); + show_usage(); if (argv[1][0] != '-') { char *tmp = xmalloc(strlen(argv[1]) + 2); @@ -283,7 +283,7 @@ extern int tar_main(int argc, char **argv) break; #endif default: - usage(tar_usage); + show_usage(); } } |