]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
conf: improve some error messages
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 20 Mar 2025 14:12:07 +0000 (15:12 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 20 Mar 2025 15:34:33 +0000 (16:34 +0100)
conf.c

diff --git a/conf.c b/conf.c
index e24c4d089ae0fd00e2ca3e2cf92bdfbfef45be6b..1e023fca1386c5a5d4693503211e79de4e530407 100644 (file)
--- a/conf.c
+++ b/conf.c
@@ -793,7 +793,7 @@ CNF_ParseLine(const char *filename, int number, char *line)
              !strcasecmp(command, "linux_hz")) {
     LOG(LOGS_WARN, "%s directive is no longer supported", command);
   } else {
-    other_parse_error("Invalid directive");
+    other_parse_error("Invalid directive %s", command);
   }
 
   processed_file = processed_command = NULL;
@@ -1064,13 +1064,13 @@ parse_refclock(char *line)
       n = 0;
       sel_options |= sel_option;
     } else {
-      other_parse_error("Invalid refclock option");
+      other_parse_error("Invalid %s %s directive", "option in", processed_command);
       return;
     }
   }
 
   if (*cmd) {
-    command_parse_error();
+    other_parse_error("Invalid %s %s directive", "value in", processed_command);
     return;
   }