From: Sami Kerola Date: Sat, 1 Dec 2012 19:13:49 +0000 (+0000) Subject: anacron: clean up usage() output X-Git-Tag: cronie1.4.11~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d020c2d5a8fb457e36647c5dd2fbf2da2bb9d39;p=cronie anacron: clean up usage() output Inform in usage which options will need arguments, and add reference to manual page. Signed-off-by: Sami Kerola --- diff --git a/anacron/main.c b/anacron/main.c index 5194c5b..2c55716 100644 --- a/anacron/main.c +++ b/anacron/main.c @@ -79,25 +79,22 @@ print_version() static void print_usage() { - printf("Usage: anacron [-s] [-f] [-n] [-d] [-q] [-t anacrontab] [-S spooldir] [job] ...\n" - " anacron [-S spooldir] -u [job] ...\n" - " anacron [-V|-h]\n" - " anacron -T [-t anacrontab]\n" - "\n" - " -s Serialize execution of jobs\n" - " -f Force execution of jobs, even before their time\n" - " -n Run jobs with no delay, implies -s\n" - " -d Don't fork to the background\n" - " -q Suppress stderr messages, only applicable with -d\n" - " -u Update the timestamps without actually running anything\n" - " -t Use this anacrontab\n" - " -V Print version information\n" - " -h Print this message\n" - " -T Test an anacrontab\n" - " -S Select a different spool directory\n" - "\n" - "See the manpage for more details.\n" - "\n"); + printf("Usage:\n"); + printf(" %s [options] [job] ...\n", program_name); + printf(" %s -T [-t anacrontab-file]\n", program_name); + printf("\nOptions:\n"); + printf(" -s Serialize execution of jobs\n"); + printf(" -f Force execution of jobs, even before their time\n"); + printf(" -n Run jobs with no delay, implies -s\n"); + printf(" -d Don't fork to the background\n"); + printf(" -q Suppress stderr messages, only applicable with -d\n"); + printf(" -u Update the timestamps without actually running anything\n"); + printf(" -V Print version information\n"); + printf(" -h Print this message\n"); + printf(" -t Use alternative anacrontab\n"); + printf(" -T Test an anacrontab\n"); + printf(" -S Select a different spool directory\n"); + printf("\nSee the anacron(8) manpage for more details.\n"); } static void