diff options
author | "Vladimir N. Oleynik" | 2005-09-05 14:46:07 +0000 |
---|---|---|
committer | "Vladimir N. Oleynik" | 2005-09-05 14:46:07 +0000 |
commit | 27421a1878847389391c1a43420baaccf57057a7 (patch) | |
tree | 73e57d430a5828d242b78deb0a591a99f0df44a9 /util-linux/hwclock.c | |
parent | bef14d7a878049a01f1fb9b412611a2d64c2b154 (diff) | |
download | busybox-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 'util-linux/hwclock.c')
-rw-r--r-- | util-linux/hwclock.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c index 3c26839..11261f4 100644 --- a/util-linux/hwclock.c +++ b/util-linux/hwclock.c @@ -205,12 +205,8 @@ static const struct option hwclock_long_options[] = { bb_applet_long_options = hwclock_long_options; #endif - bb_opt_complementaly = "r~ws:w~rs:s~wr:l~u:u~l"; + bb_opt_complementally = "!r~ws:w~rs:s~wr:l~u:u~l"; opt = bb_getopt_ulflags(argc, argv, "lursw"); - /* Check only one mode was given */ - if(opt & BB_GETOPT_ERROR) { - bb_show_usage(); - } /* If -u or -l wasn't given check if we are using utc */ if (opt & (HWCLOCK_OPT_UTC | HWCLOCK_OPT_LOCALTIME)) |