]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3259. [bug] named-compilezone: Suppress "dump zone to <file>"
authorEvan Hunt <each@isc.org>
Thu, 22 Dec 2011 17:29:22 +0000 (17:29 +0000)
committerEvan Hunt <each@isc.org>
Thu, 22 Dec 2011 17:29:22 +0000 (17:29 +0000)
message when writing to stdout. [RT #27109]

CHANGES
bin/check/named-checkzone.c

diff --git a/CHANGES b/CHANGES
index ac602d72d00d437b90bf74c883a9b3561021c835..ff5c48d20d61fa6ade47c6272c0dc223a5c7ae93 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+3259.  [bug]           named-compilezone: Suppress "dump zone to <file>"
+                       message when writing to stdout. [RT #27109]
+
 3258.  [test]          Add "forcing full sign with unreadable keys" test.
                        [RT #27153]
 
index c5ababdd47af35a0f0c98cd5df2a02a07b8d1d43..8e1ae0179e646d1cd90e8dd74be6cc84c3600399 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named-checkzone.c,v 1.64 2011/12/22 07:32:39 each Exp $ */
+/* $Id: named-checkzone.c,v 1.65 2011/12/22 17:29:22 each Exp $ */
 
 /*! \file */
 
@@ -116,6 +116,7 @@ main(int argc, char **argv) {
        dns_masterrawheader_t header;
        isc_uint32_t rawversion = 1, serialnum = 0;
        isc_boolean_t snset = ISC_FALSE;
+       isc_boolean_t logdump = ISC_FALSE;
        FILE *errout = stdout;
        char *endp;
 
@@ -449,6 +450,7 @@ main(int argc, char **argv) {
 
        if (progmode == progmode_compile) {
                dumpzone = 1;   /* always dump */
+               logdump = !quiet;
                if (output_filename == NULL) {
                        fprintf(stderr,
                                "output file required, but not specified\n");
@@ -467,8 +469,10 @@ main(int argc, char **argv) {
            (output_filename == NULL ||
             strcmp(output_filename, "-") == 0 ||
             strcmp(output_filename, "/dev/fd/1") == 0 ||
-            strcmp(output_filename, "/dev/stdout") == 0))
+            strcmp(output_filename, "/dev/stdout") == 0)) {
                errout = stderr;
+               logdump = ISC_FALSE;
+       }
 
        if (isc_commandline_index + 2 != argc)
                usage();
@@ -500,13 +504,13 @@ main(int argc, char **argv) {
        }
 
        if (result == ISC_R_SUCCESS && dumpzone) {
-               if (!quiet && progmode == progmode_compile) {
+               if (logdump) {
                        fprintf(errout, "dump zone to %s...", output_filename);
                        fflush(errout);
                }
                result = dump_zone(origin, zone, output_filename,
                                   outputformat, outputstyle, rawversion);
-               if (!quiet && progmode == progmode_compile)
+               if (logdump)
                        fprintf(errout, "done\n");
        }