summaryrefslogtreecommitdiff
path: root/coreutils/date.c
diff options
context:
space:
mode:
author"Vladimir N. Oleynik"2005-09-05 14:46:07 +0000
committer"Vladimir N. Oleynik"2005-09-05 14:46:07 +0000
commit27421a1878847389391c1a43420baaccf57057a7 (patch)
tree73e57d430a5828d242b78deb0a591a99f0df44a9 /coreutils/date.c
parentbef14d7a878049a01f1fb9b412611a2d64c2b154 (diff)
downloadbusybox-27421a1878847389391c1a43420baaccf57057a7.zip
busybox-27421a1878847389391c1a43420baaccf57057a7.tar.gz
1) bb_opt_complementaly -> bb_opt_complementally
2) better support long options 3) new flag '!' for bb_opt_complementally: produce bb_show_usage() if BB_GETOPT_ERROR internally
Diffstat (limited to 'coreutils/date.c')
-rw-r--r--coreutils/date.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/coreutils/date.c b/coreutils/date.c
index 70484e2..0488b2d 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -152,7 +152,7 @@ int date_main(int argc, char **argv)
#else
# define GETOPT_ISOFMT
#endif
- bb_opt_complementaly = "d~ds:s~ds";
+ bb_opt_complementally = "!d~ds:s~ds";
opt = bb_getopt_ulflags(argc, argv, "Rs:ud:r:" GETOPT_ISOFMT,
&date_str, &date_str, &filename
#ifdef CONFIG_FEATURE_DATE_ISOFMT
@@ -165,8 +165,6 @@ int date_main(int argc, char **argv)
bb_error_msg_and_die(bb_msg_memory_exhausted);
}
use_arg = opt & DATE_OPT_DATE;
- if(opt & BB_GETOPT_ERROR)
- bb_show_usage();
#ifdef CONFIG_FEATURE_DATE_ISOFMT
if(opt & DATE_OPT_TIMESPEC) {
if (!isofmt_arg) {