summaryrefslogtreecommitdiff
path: root/debianutils
diff options
context:
space:
mode:
Diffstat (limited to 'debianutils')
-rw-r--r--debianutils/run_parts.c5
-rw-r--r--debianutils/start_stop_daemon.c20
-rw-r--r--debianutils/which.c3
3 files changed, 15 insertions, 13 deletions
diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c
index b770383..e4d61df 100644
--- a/debianutils/run_parts.c
+++ b/debianutils/run_parts.c
@@ -181,8 +181,9 @@ int run_parts_main(int argc UNUSED_PARAM, char **argv)
INIT_G();
/* We require exactly one argument: the directory name */
- opt_complementary = "=1";
- GETOPT32(argv, "a:*u:" LONGOPTS, &arg_list, &umask_p);
+ GETOPT32(argv, "^" "a:*u:" "\0" "=1" LONGOPTS,
+ &arg_list, &umask_p
+ );
umask(xstrtou_range(umask_p, 8, 0, 07777));
diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c
index 45c277a..12cf6c3 100644
--- a/debianutils/start_stop_daemon.c
+++ b/debianutils/start_stop_daemon.c
@@ -451,15 +451,17 @@ int start_stop_daemon_main(int argc UNUSED_PARAM, char **argv)
INIT_G();
- /* -K or -S is required; they are mutually exclusive */
- /* -p is required if -m is given */
- /* -xpun (at least one) is required if -K is given */
- /* -xa (at least one) is required if -S is given */
- /* -q turns off -v */
- opt_complementary = "K:S:K--S:S--K:m?p:K?xpun:S?xa"
- IF_FEATURE_START_STOP_DAEMON_FANCY("q-v");
- opt = GETOPT32(argv, "KSbqtma:n:s:u:c:x:p:"
- IF_FEATURE_START_STOP_DAEMON_FANCY("ovN:R:"),
+ opt = GETOPT32(argv, "^"
+ "KSbqtma:n:s:u:c:x:p:"
+ IF_FEATURE_START_STOP_DAEMON_FANCY("ovN:R:")
+ /* -K or -S is required; they are mutually exclusive */
+ /* -p is required if -m is given */
+ /* -xpun (at least one) is required if -K is given */
+ /* -xa (at least one) is required if -S is given */
+ /* -q turns off -v */
+ "\0"
+ "K:S:K--S:S--K:m?p:K?xpun:S?xa"
+ IF_FEATURE_START_STOP_DAEMON_FANCY("q-v"),
LONGOPTS
&startas, &cmdname, &signame, &userspec, &chuid, &execname, &pidfile
IF_FEATURE_START_STOP_DAEMON_FANCY(,&opt_N)
diff --git a/debianutils/which.c b/debianutils/which.c
index b31d618..3bd54ac 100644
--- a/debianutils/which.c
+++ b/debianutils/which.c
@@ -37,8 +37,7 @@ int which_main(int argc UNUSED_PARAM, char **argv)
if (!env_path)
env_path = bb_default_root_path;
- opt_complementary = "-1"; /* at least one argument */
- getopt32(argv, "a");
+ getopt32(argv, "^" "a" "\0" "-1"/*at least one arg*/);
argv += optind;
do {