diff options
author | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-02-05 19:34:53 +0000 |
---|---|---|
committer | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-02-05 19:34:53 +0000 |
commit | b962948eff2fdc3aa013502a9285580a482fb6b4 (patch) | |
tree | aba959ad9192f768f3dea810888cd24bbe29140c | |
parent | 79dd6d8d02b25664eed629e0b679e00cc0d64825 (diff) | |
download | busybox-w32-b962948eff2fdc3aa013502a9285580a482fb6b4.tar.gz busybox-w32-b962948eff2fdc3aa013502a9285580a482fb6b4.tar.bz2 busybox-w32-b962948eff2fdc3aa013502a9285580a482fb6b4.zip |
* archival/gzip.c (gzip_main): Display usage if given multiple files.
git-svn-id: svn://busybox.net/trunk/busybox@4188 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r-- | archival/gzip.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/archival/gzip.c b/archival/gzip.c index 436393ed5..732a83e90 100644 --- a/archival/gzip.c +++ b/archival/gzip.c | |||
@@ -1246,6 +1246,9 @@ int gzip_main(int argc, char **argv) | |||
1246 | tostdout = 1; | 1246 | tostdout = 1; |
1247 | } | 1247 | } |
1248 | 1248 | ||
1249 | if (argc - optind > 1) | ||
1250 | show_usage (); | ||
1251 | |||
1249 | if (isatty(fileno(stdout)) && tostdout==1 && force==0) | 1252 | if (isatty(fileno(stdout)) && tostdout==1 && force==0) |
1250 | error_msg_and_die( "compressed data not written to terminal. Use -f to force it."); | 1253 | error_msg_and_die( "compressed data not written to terminal. Use -f to force it."); |
1251 | 1254 | ||