From: Michal Rakowski Date: Fri, 30 Oct 2020 21:53:08 +0000 (+0100) Subject: Fix #6920 About lack of filename logging in case of reading state_file err X-Git-Tag: Release-11.3.2~878 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b7fa41a20748f5e196094f7b038857a01d1e8ae;p=thirdparty%2Fbacula.git Fix #6920 About lack of filename logging in case of reading state_file err --- diff --git a/bacula/src/lib/bsys.c b/bacula/src/lib/bsys.c index a0c86edd4..e2326fc50 100644 --- a/bacula/src/lib/bsys.c +++ b/bacula/src/lib/bsys.c @@ -747,14 +747,14 @@ void read_state_file(char *dir, const char *progname, int port) // Dmsg1(10, "O_BINARY=%d\n", O_BINARY); if ((sfd = open(fname, O_RDONLY|O_BINARY)) < 0) { berrno be; - Dmsg3(010, "Could not open state file. sfd=%d size=%d: ERR=%s\n", - sfd, (int)sizeof(hdr), be.bstrerror()); + Dmsg4(010, "Could not open state file: %s sfd=%d size=%d ERR=%s\n", + fname, sfd, (int)sizeof(hdr), be.bstrerror()); goto bail_out; } if ((stat=read(sfd, &hdr, hdr_size)) != hdr_size) { berrno be; - Dmsg4(010, "Could not read state file. sfd=%d stat=%d size=%d: ERR=%s\n", - sfd, (int)stat, hdr_size, be.bstrerror()); + Dmsg5(010, "Could not read state file: %s sfd=%d stat=%d size=%d ERR=%s\n", + fname, sfd, (int)stat, hdr_size, be.bstrerror()); goto bail_out; } if (hdr.version != state_hdr.version) {