From ea4fc47cda0f40c8e71d1e283caf132c721f25b6 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 22 Sep 2020 17:10:16 +0200 Subject: [PATCH] client: improve help message Describe all chronyc options in the help message. --- client.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/client.c b/client.c index 8a70373..7d59657 100644 --- a/client.c +++ b/client.c @@ -3483,8 +3483,22 @@ display_gpl(void) static void print_help(const char *progname) { - printf("Usage: %s [-h HOST] [-p PORT] [-n] [-N] [-c] [-d] [-4|-6] [-m] [COMMAND]\n", - progname); + printf("Usage: %s [OPTION]... [COMMAND]...\n\n" + "Options:\n" + " -4\t\tUse IPv4 addresses only\n" + " -6\t\tUse IPv6 addresses only\n" + " -n\t\tDon't resolve hostnames\n" + " -N\t\tPrint original source names\n" + " -c\t\tEnable CSV format\n" +#if DEBUG > 0 + " -d\t\tEnable debug messages\n" +#endif + " -m\t\tAccept multiple commands\n" + " -h HOST\tSpecify server (%s)\n" + " -p PORT\tSpecify UDP port (%d)\n" + " -v, --version\tPrint version and exit\n" + " --help\tPrint usage and exit\n", + progname, DEFAULT_COMMAND_SOCKET",127.0.0.1,::1", DEFAULT_CANDM_PORT); } /* ================================================== */