summaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorMatt Kraai2002-02-05 19:34:53 +0000
committerMatt Kraai2002-02-05 19:34:53 +0000
commit592a3e63ee06604eb27a888ffb03a0ff3dbf5cf0 (patch)
treeaba959ad9192f768f3dea810888cd24bbe29140c /archival
parent273af73317a9f0b697a3240aa6733d30137878e7 (diff)
downloadbusybox-592a3e63ee06604eb27a888ffb03a0ff3dbf5cf0.zip
busybox-592a3e63ee06604eb27a888ffb03a0ff3dbf5cf0.tar.gz
* archival/gzip.c (gzip_main): Display usage if given multiple files.
Diffstat (limited to 'archival')
-rw-r--r--archival/gzip.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/archival/gzip.c b/archival/gzip.c
index 436393e..732a83e 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -1246,6 +1246,9 @@ int gzip_main(int argc, char **argv)
tostdout = 1;
}
+ if (argc - optind > 1)
+ show_usage ();
+
if (isatty(fileno(stdout)) && tostdout==1 && force==0)
error_msg_and_die( "compressed data not written to terminal. Use -f to force it.");