From: W.C.A. Wijngaards Date: Thu, 12 Aug 2021 14:06:02 +0000 (+0200) Subject: - Fix to print error from unbound-anchor for writing to the key X-Git-Tag: release-1.14.0rc1~80 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdae4cdbbb132296b3b8654a0747d61ddb6b4a25;p=thirdparty%2Funbound.git - Fix to print error from unbound-anchor for writing to the key file, also when not verbose. --- diff --git a/doc/Changelog b/doc/Changelog index 879301387..8deb1c73f 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -11,6 +11,8 @@ - For #519: yacc and lex. And fix python bindings, and test program unbound-dnstap-socket. - For #519: fix comments for doxygen. + - Fix to print error from unbound-anchor for writing to the key + file, also when not verbose. 5 August 2021: Wouter - Tag for 1.13.2rc1 release. diff --git a/smallapp/unbound-anchor.c b/smallapp/unbound-anchor.c index 3e6fc6e6f..3bc25a10c 100644 --- a/smallapp/unbound-anchor.c +++ b/smallapp/unbound-anchor.c @@ -2044,13 +2044,13 @@ write_builtin_anchor(const char* file) const char* builtin_root_anchor = get_builtin_ds(); FILE* out = fopen(file, "w"); if(!out) { - if(verb) printf("%s: %s\n", file, strerror(errno)); - if(verb) printf(" could not write builtin anchor\n"); + printf("could not write builtin anchor, to file %s: %s\n", + file, strerror(errno)); return; } if(!fwrite(builtin_root_anchor, strlen(builtin_root_anchor), 1, out)) { - if(verb) printf("%s: %s\n", file, strerror(errno)); - if(verb) printf(" could not complete write builtin anchor\n"); + printf("could not complete write builtin anchor, to file %s: %s\n", + file, strerror(errno)); } fclose(out); }