From 068cd3c311910d650fcaa4c8b94140cc263dfae3 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 22 Sep 2020 17:01:29 +0200 Subject: [PATCH] doc: document long options Document the --version and --help options in chronyd and chronyc man page. --- client.c | 2 +- doc/chronyc.adoc | 6 +++++- doc/chronyd.adoc | 5 ++++- main.c | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/client.c b/client.c index 5f068fb..8a70373 100644 --- a/client.c +++ b/client.c @@ -3506,7 +3506,7 @@ main(int argc, char **argv) int opt, ret = 1, multi = 0, family = IPADDR_UNSPEC; int port = DEFAULT_CANDM_PORT; - /* Parse (undocumented) long command-line options */ + /* Parse long command-line options */ for (optind = 1; optind < argc; optind++) { if (!strcmp("--help", argv[optind])) { print_help(progname); diff --git a/doc/chronyc.adoc b/doc/chronyc.adoc index bd4437a..e416945 100644 --- a/doc/chronyc.adoc +++ b/doc/chronyc.adoc @@ -118,10 +118,14 @@ This option is ignored and is provided only for compatibility. *-a*:: This option is ignored and is provided only for compatibility. -*-v*:: +*-v*, *--version*:: With this option *chronyc* displays its version number on the terminal and exits. +*--help*:: +With this option *chronyc* displays a help message on the terminal and +exits. + == COMMANDS This section describes each of the commands available within the *chronyc* diff --git a/doc/chronyd.adoc b/doc/chronyd.adoc index c3bd80d..f67eb29 100644 --- a/doc/chronyd.adoc +++ b/doc/chronyd.adoc @@ -187,9 +187,12 @@ still track its offset and frequency relative to the estimated true time. This option allows *chronyd* to be started without the capability to adjust or set the system clock (e.g. in some containers) to operate as an NTP server. -*-v*:: +*-v*, *--version*:: With this option *chronyd* will print version number to the terminal and exit. +*-h*, *--help*:: +With this option *chronyd* will print a help message to the terminal and exit. + == FILES _@SYSCONFDIR@/chrony.conf_ diff --git a/main.c b/main.c index 3690fd8..3399670 100644 --- a/main.c +++ b/main.c @@ -417,7 +417,7 @@ int main LOG_Initialise(); - /* Parse (undocumented) long command-line options */ + /* Parse long command-line options */ for (optind = 1; optind < argc; optind++) { if (!strcmp("--help", argv[optind])) { print_help(progname);