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
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 @@
#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 @@
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) {