X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=miscutils%2Fcrond.c;h=a0b73c77497018d1abed6c469bac6da8623150ab;hb=774bce8e8ba1e424c953e8f13aee8f0778c8a911;hp=7f2d54c9f305acfe85604d8843e4fa48b77774db;hpb=bec588878b6d435c33d9b0aae6247715c259e3a4;p=oweals%2Fbusybox.git diff --git a/miscutils/crond.c b/miscutils/crond.c index 7f2d54c9f..a0b73c774 100644 --- a/miscutils/crond.c +++ b/miscutils/crond.c @@ -11,6 +11,19 @@ * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ +//usage:#define crond_trivial_usage +//usage: "-fbS -l N " IF_FEATURE_CROND_D("-d N ") "-L LOGFILE -c DIR" +//usage:#define crond_full_usage "\n\n" +//usage: " -f Foreground" +//usage: "\n -b Background (default)" +//usage: "\n -S Log to syslog (default)" +//usage: "\n -l Set log level. 0 is the most verbose, default 8" +//usage: IF_FEATURE_CROND_D( +//usage: "\n -d Set log level, log to stderr" +//usage: ) +//usage: "\n -L Log to file" +//usage: "\n -c Working dir" + #include "libbb.h" #include @@ -35,7 +48,7 @@ # define CRONUPDATE "cron.update" #endif #ifndef MAXLINES -# define MAXLINES 256 /* max lines in non-root crontabs */ +# define MAXLINES 256 /* max lines in non-root crontabs */ #endif @@ -170,7 +183,7 @@ static void ParseField(char *user, char *ary, int modvalue, int off, /* Handle numeric digit or symbol or '*' */ if (*ptr == '*') { - n1 = 0; /* everything will be filled */ + n1 = 0; /* everything will be filled */ n2 = modvalue - 1; skip = 1; ++ptr; @@ -848,7 +861,8 @@ int crond_main(int argc UNUSED_PARAM, char **argv) /* "-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") - ":l+:d+"; /* -l and -d have numeric param */ + /* -l and -d have numeric param */ + ":l+" IF_FEATURE_CROND_D(":d+"); opts = getopt32(argv, "l:L:fbSc:" IF_FEATURE_CROND_D("d:"), &G.log_level, &G.log_filename, &G.crontab_dir_name IF_FEATURE_CROND_D(,&G.log_level));