X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=miscutils%2Fcrond.c;h=f6580a9d41543427a0facecb0c169421bbfc1a13;hb=9b70f197b4dd5be47c5d0d4479525efe012964ee;hp=5ae0ff084ef246461085c60f976345013878fe39;hpb=bbf17bbf326c7157ca237b9659472ddf7626e68d;p=oweals%2Fbusybox.git diff --git a/miscutils/crond.c b/miscutils/crond.c index 5ae0ff084..f6580a9d4 100644 --- a/miscutils/crond.c +++ b/miscutils/crond.c @@ -22,7 +22,7 @@ //config: 40 4 * * * /etc/cron/daily > /dev/null 2>&1 //config: //config:config FEATURE_CROND_D -//config: bool "Support option -d to redirect output to stderr" +//config: bool "Support -d (redirect output to stderr)" //config: depends on CROND //config: default y //config: help @@ -1021,13 +1021,17 @@ int crond_main(int argc UNUSED_PARAM, char **argv) INIT_G(); - /* "-b after -f is ignored", and so on for every pair a-b */ - opt_complementary = "f-b:b-f:S-L:L-S" IF_FEATURE_CROND_D(":d-l") + opts = getopt32(argv, "^" + "l:L:fbSc:" IF_FEATURE_CROND_D("d:") + "\0" + /* "-b after -f is ignored", and so on for every pair a-b */ + "f-b:b-f:S-L:L-S" IF_FEATURE_CROND_D(":d-l") /* -l and -d have numeric param */ - ":l+" IF_FEATURE_CROND_D(":d+"); - opts = getopt32(argv, "l:L:fbSc:" IF_FEATURE_CROND_D("d:"), + ":l+" IF_FEATURE_CROND_D(":d+") + , &G.log_level, &G.log_filename, &G.crontab_dir_name - IF_FEATURE_CROND_D(,&G.log_level)); + IF_FEATURE_CROND_D(,&G.log_level) + ); /* both -d N and -l N set the same variable: G.log_level */ if (!(opts & OPT_f)) {