summaryrefslogtreecommitdiff
path: root/bin/check/named-checkzone.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/check/named-checkzone.c')
-rw-r--r--bin/check/named-checkzone.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/bin/check/named-checkzone.c b/bin/check/named-checkzone.c
index 100e809867d11..11491b580862e 100644
--- a/bin/check/named-checkzone.c
+++ b/bin/check/named-checkzone.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2011 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: named-checkzone.c,v 1.61 2010-09-07 23:46:59 tbox Exp $ */
+/* $Id: named-checkzone.c,v 1.61.62.2 2011/12/22 23:45:54 tbox Exp $ */
/*! \file */
@@ -112,6 +112,7 @@ main(int argc, char **argv) {
const char *outputformatstr = NULL;
dns_masterformat_t inputformat = dns_masterformat_text;
dns_masterformat_t outputformat = dns_masterformat_text;
+ isc_boolean_t logdump = ISC_FALSE;
FILE *errout = stdout;
outputstyle = &dns_master_style_full;
@@ -418,6 +419,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");
@@ -436,8 +438,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();
@@ -462,13 +466,13 @@ main(int argc, char **argv) {
&zone);
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);
- if (!quiet && progmode == progmode_compile)
+ if (logdump)
fprintf(errout, "done\n");
}