From 0e08ca7c89a9c84050e609fade96b2579fb13b28 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 22 Sep 2020 17:09:51 +0200 Subject: [PATCH] main: improve help message Describe all chronyd options in the help message. --- main.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 3399670..e8bf122 100644 --- a/main.c +++ b/main.c @@ -374,8 +374,34 @@ go_daemon(void) static void print_help(const char *progname) { - printf("Usage: %s [-4|-6] [-n|-d] [-p|-q|-Q] [-r] [-R] [-s] [-t TIMEOUT] [-f FILE|COMMAND...]\n", - progname); + printf("Usage: %s [OPTION]... [DIRECTIVE]...\n\n" + "Options:\n" + " -4\t\tUse IPv4 addresses only\n" + " -6\t\tUse IPv6 addresses only\n" + " -f FILE\tSpecify configuration file (%s)\n" + " -n\t\tDon't run as daemon\n" + " -d\t\tDon't run as daemon and log to stderr\n" +#if DEBUG > 0 + " -d -d\t\tEnable debug messages\n" +#endif + " -l FILE\tLog to file\n" + " -L LEVEL\tSet logging threshold (0)\n" + " -p\t\tPrint configuration and exit\n" + " -q\t\tSet clock and exit\n" + " -Q\t\tLog offset and exit\n" + " -r\t\tReload dump files\n" + " -R\t\tAdapt configuration for restart\n" + " -s\t\tSet clock from RTC\n" + " -t SECONDS\tExit after elapsed time\n" + " -u USER\tSpecify user (%s)\n" + " -U\t\tDon't check for root\n" + " -F LEVEL\tSet system call filter level (0)\n" + " -P PRIORITY\tSet process priority (0)\n" + " -m\t\tLock memory\n" + " -x\t\tDon't control clock\n" + " -v, --version\tPrint version and exit\n" + " -h, --help\tPrint usage and exit\n", + progname, DEFAULT_CONF_FILE, DEFAULT_USER); } /* ================================================== */