]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
client: add -d option to print debug messages
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 18 Aug 2015 11:04:09 +0000 (13:04 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 21 Aug 2015 11:26:45 +0000 (13:26 +0200)
chrony.texi.in
chronyc.1.in
client.c
configure

index 15a94c85b547bb9b735ed4570f1f567608076b01..e04d029ac9a2c92b89a04188c5a14ad15437e728 100644 (file)
@@ -3265,6 +3265,9 @@ This defaults to the compiled-in default; there would rarely be a need
 to change this.
 @item -n
 This option disables resolving IP addresses to hostnames.
+@item -d
+This option enables printing of debugging messages (if compiled with debugging
+support).
 @item -4
 With this option hostnames will be resolved only to IPv4 addresses.
 @item -6
index 4a796ccad972417a900af6da60d3da0f6c59101d..acd76ad642c45f61dc65c5f72cd10a09a1bf20e7 100644 (file)
@@ -32,6 +32,9 @@ specify port-number
 \fB\-n\fR
 display raw IP addresses (don't attempt to look up hostnames)
 .TP
+\fB\-d\fR
+print debugging messages (if compiled with debugging support)
+.TP
 \fB\-4\fR
 resolve hostnames only to IPv4 addresses
 .TP
index 9600fe398690b62ba9c0ca8547db75e3347b8e51..41badc819e3601c8cf165d003e1b89ff0aeea65d 100644 (file)
--- a/client.c
+++ b/client.c
@@ -2797,6 +2797,8 @@ main(int argc, char **argv)
       }
     } else if (!strcmp(*argv, "-a")) {
       auto_auth = 1;
+    } else if (!strcmp(*argv, "-d")) {
+      log_debug_enabled = 1;
     } else if (!strcmp(*argv, "-m")) {
       multi = 1;
     } else if (!strcmp(*argv, "-n")) {
@@ -2810,7 +2812,7 @@ main(int argc, char **argv)
       return 0;
     } else if (!strncmp(*argv, "-", 1)) {
       LOG(LOGS_ERR, LOGF_Client,
-          "Usage: %s [-h HOST] [-p PORT] [-n] [-4|-6] [-a] [-f FILE] [-m] [COMMAND]",
+          "Usage: %s [-h HOST] [-p PORT] [-n] [-d] [-4|-6] [-a] [-f FILE] [-m] [COMMAND]",
           progname);
       return 1;
     } else {
index ed0d7952b2936db115d4b19a0ba7e9311ed6a357..135a4de07520b6b1a019c482032acaefec409647 100755 (executable)
--- a/configure
+++ b/configure
@@ -768,9 +768,9 @@ add_def DEFAULT_CONF_FILE "\"$SYSCONFDIR/chrony.conf\""
 add_def DEFAULT_USER "\"$default_user\""
 add_def MAIL_PROGRAM "\"$mail_program\""
 
-common_features="`get_features ASYNCDNS IPV6 SECHASH`"
+common_features="`get_features ASYNCDNS IPV6 SECHASH DEBUG`"
 chronyc_features="`get_features READLINE`"
-chronyd_features="`get_features CMDMON NTP REFCLOCK RTC PRIVDROP DEBUG`"
+chronyd_features="`get_features CMDMON NTP REFCLOCK RTC PRIVDROP`"
 add_def CHRONYC_FEATURES "\"$chronyc_features $common_features\""
 add_def CHRONYD_FEATURES "\"$chronyd_features $common_features\""
 echo "Features : $chronyd_features $chronyc_features $common_features"