aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorGravatar Denis Vlasenko <vda.linux@googlemail.com>2008-04-28 00:10:34 +0000
committerGravatar Denis Vlasenko <vda.linux@googlemail.com>2008-04-28 00:10:34 +0000
commite6520f05328c38333284df5f42b9c2bfb7c4fec9 (patch)
tree2c75e844c29dc0631c5b59c8f3634b11b8803c10 /coreutils
parentc0431ed455a601ddbfcd9f30d6397d4e9145cf54 (diff)
downloadbusybox-e6520f05328c38333284df5f42b9c2bfb7c4fec9.tar.gz
busybox-e6520f05328c38333284df5f42b9c2bfb7c4fec9.tar.bz2
date: complain if there are extraneout arguments
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/date.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/coreutils/date.c b/coreutils/date.c
index 2aecbaac2..2c61aa646 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -79,6 +79,8 @@ int date_main(int argc ATTRIBUTE_UNUSED, char **argv)
if (!(opt & (DATE_OPT_SET | DATE_OPT_DATE))) {
opt |= DATE_OPT_SET;
date_str = argv[0]; /* can be NULL */
+ } else if (argv[0]) {
+ bb_show_usage();
}
/* Now we have parsed all the information except the date format