diff options
Diffstat (limited to 'runit')
-rw-r--r-- | runit/chpst.c | 7 | ||||
-rw-r--r-- | runit/runsvdir.c | 3 | ||||
-rw-r--r-- | runit/sv.c | 5 | ||||
-rw-r--r-- | runit/svlogd.c | 7 |
4 files changed, 12 insertions, 10 deletions
diff --git a/runit/chpst.c b/runit/chpst.c index c061a91ea..3ecb85cba 100644 --- a/runit/chpst.c +++ b/runit/chpst.c | |||
@@ -301,9 +301,10 @@ int chpst_main(int argc UNUSED_PARAM, char **argv) | |||
301 | // FIXME: can we live with int-sized limits? | 301 | // FIXME: can we live with int-sized limits? |
302 | // can we live with 40000 days? | 302 | // can we live with 40000 days? |
303 | // if yes -> getopt converts strings to numbers for us | 303 | // if yes -> getopt converts strings to numbers for us |
304 | opt_complementary = "-1"; | 304 | opt = getopt32(argv, "^+" |
305 | opt = getopt32(argv, "+a:+c:+d:+f:+l:+m:+o:+p:+r:+s:+t:+u:U:e:" | 305 | "a:+c:+d:+f:+l:+m:+o:+p:+r:+s:+t:+u:U:e:" |
306 | IF_CHPST("/:n:vP012"), | 306 | IF_CHPST("/:n:vP012") |
307 | "\0" "-1", | ||
307 | &limita, &limitc, &limitd, &limitf, &limitl, | 308 | &limita, &limitc, &limitd, &limitf, &limitl, |
308 | &limitm, &limito, &limitp, &limitr, &limits, &limitt, | 309 | &limitm, &limito, &limitp, &limitr, &limits, &limitt, |
309 | &set_user, &set_user, &env_dir | 310 | &set_user, &set_user, &env_dir |
diff --git a/runit/runsvdir.c b/runit/runsvdir.c index abba2e8e4..11ab40abf 100644 --- a/runit/runsvdir.c +++ b/runit/runsvdir.c | |||
@@ -248,10 +248,9 @@ int runsvdir_main(int argc UNUSED_PARAM, char **argv) | |||
248 | 248 | ||
249 | INIT_G(); | 249 | INIT_G(); |
250 | 250 | ||
251 | opt_complementary = "-1"; | ||
252 | opt_s_argv[0] = NULL; | 251 | opt_s_argv[0] = NULL; |
253 | opt_s_argv[2] = NULL; | 252 | opt_s_argv[2] = NULL; |
254 | getopt32(argv, "Ps:", &opt_s_argv[0]); | 253 | getopt32(argv, "^" "Ps:" "\0" "-1", &opt_s_argv[0]); |
255 | argv += optind; | 254 | argv += optind; |
256 | 255 | ||
257 | i_am_init = (getpid() == 1); | 256 | i_am_init = (getpid() == 1); |
diff --git a/runit/sv.c b/runit/sv.c index 477c1ac6e..1d0809be8 100644 --- a/runit/sv.c +++ b/runit/sv.c | |||
@@ -506,8 +506,9 @@ static int sv(char **argv) | |||
506 | x = getenv("SVWAIT"); | 506 | x = getenv("SVWAIT"); |
507 | if (x) waitsec = xatou(x); | 507 | if (x) waitsec = xatou(x); |
508 | 508 | ||
509 | opt_complementary = "vv"; /* -w N, -v is a counter */ | 509 | getopt32(argv, "^" "w:+v" "\0" "vv" /* -w N, -v is a counter */, |
510 | getopt32(argv, "w:+v", &waitsec, &verbose); | 510 | &waitsec, &verbose |
511 | ); | ||
511 | argv += optind; | 512 | argv += optind; |
512 | action = *argv++; | 513 | action = *argv++; |
513 | if (!action || !*argv) bb_show_usage(); | 514 | if (!action || !*argv) bb_show_usage(); |
diff --git a/runit/svlogd.c b/runit/svlogd.c index 831873d86..739483356 100644 --- a/runit/svlogd.c +++ b/runit/svlogd.c | |||
@@ -1037,9 +1037,10 @@ int svlogd_main(int argc, char **argv) | |||
1037 | 1037 | ||
1038 | INIT_G(); | 1038 | INIT_G(); |
1039 | 1039 | ||
1040 | opt_complementary = "tt:vv"; | 1040 | opt = getopt32(argv, "^" |
1041 | opt = getopt32(argv, "r:R:l:b:tv", | 1041 | "r:R:l:b:tv" "\0" "tt:vv", |
1042 | &r, &replace, &l, &b, ×tamp, &verbose); | 1042 | &r, &replace, &l, &b, ×tamp, &verbose |
1043 | ); | ||
1043 | if (opt & 1) { // -r | 1044 | if (opt & 1) { // -r |
1044 | repl = r[0]; | 1045 | repl = r[0]; |
1045 | if (!repl || r[1]) | 1046 | if (!repl || r[1]) |