summaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-02-14 21:23:06 +0000
committerEric Andersen <andersen@codepoet.org>2001-02-14 21:23:06 +0000
commit67991cf824f8df27e74c92d754fb507681c69ce6 (patch)
treea0b652f3dc794d1050c1a8de3afb014a621238fa /archival
parent68be2ab914e1e20fe666bbd22a89a18714be2789 (diff)
downloadbusybox-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.c4
-rw-r--r--archival/dpkg.c4
-rw-r--r--archival/dpkg_deb.c6
-rw-r--r--archival/gunzip.c4
-rw-r--r--archival/gzip.c4
-rw-r--r--archival/tar.c4
6 files changed, 12 insertions, 14 deletions
diff --git a/archival/ar.c b/archival/ar.c
index 7a5169e95..59f51815f 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 4a5c6f4da..6e309eb06 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 aed0ba368..c08438189 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 48a46083b..bf8812dbd 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 75f3caa35..3cbef4ec1 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 fb0fcc614..62f1b1d35 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();
}
}