aboutsummaryrefslogtreecommitdiff
path: root/util-linux/hwclock.c
diff options
context:
space:
mode:
authorvodz <vodz@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-09-05 14:46:07 +0000
committervodz <vodz@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-09-05 14:46:07 +0000
commitc9464a15caca3837092448217ff2b5868d355605 (patch)
tree73e57d430a5828d242b78deb0a591a99f0df44a9 /util-linux/hwclock.c
parent072a54c487731f37f2031a4de0e67c1d1531cf6c (diff)
downloadbusybox-w32-c9464a15caca3837092448217ff2b5868d355605.tar.gz
busybox-w32-c9464a15caca3837092448217ff2b5868d355605.tar.bz2
busybox-w32-c9464a15caca3837092448217ff2b5868d355605.zip
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 git-svn-id: svn://busybox.net/trunk/busybox@11332 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'util-linux/hwclock.c')
-rw-r--r--util-linux/hwclock.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c
index 3c2683953..11261f47d 100644
--- a/util-linux/hwclock.c
+++ b/util-linux/hwclock.c
@@ -205,12 +205,8 @@ static const struct option hwclock_long_options[] = {
205 bb_applet_long_options = hwclock_long_options; 205 bb_applet_long_options = hwclock_long_options;
206#endif 206#endif
207 207
208 bb_opt_complementaly = "r~ws:w~rs:s~wr:l~u:u~l"; 208 bb_opt_complementally = "!r~ws:w~rs:s~wr:l~u:u~l";
209 opt = bb_getopt_ulflags(argc, argv, "lursw"); 209 opt = bb_getopt_ulflags(argc, argv, "lursw");
210 /* Check only one mode was given */
211 if(opt & BB_GETOPT_ERROR) {
212 bb_show_usage();
213 }
214 210
215 /* If -u or -l wasn't given check if we are using utc */ 211 /* If -u or -l wasn't given check if we are using utc */
216 if (opt & (HWCLOCK_OPT_UTC | HWCLOCK_OPT_LOCALTIME)) 212 if (opt & (HWCLOCK_OPT_UTC | HWCLOCK_OPT_LOCALTIME))