]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
kzonecheck: fix compatibility with the unittests
authorDaniel Salzman <daniel.salzman@nic.cz>
Thu, 4 Aug 2022 09:13:04 +0000 (11:13 +0200)
committerDaniel Salzman <daniel.salzman@nic.cz>
Thu, 4 Aug 2022 09:13:04 +0000 (11:13 +0200)
src/utils/kzonecheck/main.c
src/utils/kzonecheck/zone_check.c

index 92a319d531766a7ee67637be0cf0aa53096b1d6d..3b4095008da0a4533d5c0671a269310c2b9858de 100644 (file)
@@ -162,11 +162,11 @@ int main(int argc, char *argv[])
        switch (ret) {
        case KNOT_EOK:
                if (verbose) {
-                       INFO2("no semantic error found");
+                       INFO2("No semantic error found");
                }
                return EXIT_SUCCESS;
        case KNOT_EZONEINVAL:
-               ERR2("serious semantic error detected");
+               INFO2("Serious semantic error detected");
                // FALLTHROUGH
        case KNOT_ESEMCHECK:
                return EXIT_FAILURE;
index 6e92eed42840b822630911aabb0e66a327b2f9cc..55561a5e152f5534e3a2f47edcc1b498170d2088 100644 (file)
@@ -43,7 +43,7 @@ static void err_callback(sem_handler_t *handler, const zone_contents_t *zone,
                owner = "";
        }
 
-       INFO2("[%s] %s%s%s\n", owner, sem_error_msg(error),
+       printf("[%s] %s%s%s\n", owner, sem_error_msg(error),
              (data != NULL ? " "  : ""),
              (data != NULL ? data : ""));
 
@@ -53,10 +53,10 @@ static void err_callback(sem_handler_t *handler, const zone_contents_t *zone,
 
 static void print_statistics(err_handler_stats_t *stats)
 {
-       INFO2("Error summary:");
+       printf("\nError summary:\n");
        for (sem_error_t i = 0; i <= SEM_ERR_UNKNOWN; ++i) {
                if (stats->errors[i] > 0) {
-                       INFO2("%4u\t%s", stats->errors[i], sem_error_msg(i));
+                       printf("%4u\t%s\n", stats->errors[i], sem_error_msg(i));
                }
        }
 }