]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix #6920 About lack of filename logging in case of reading state_file err
authorMichal Rakowski <michal.rakowski@baculasystems.com>
Fri, 30 Oct 2020 21:53:08 +0000 (22:53 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:02:58 +0000 (09:02 +0100)
bacula/src/lib/bsys.c

index a0c86edd4c4cb444d0005116fb704510a43eae50..e2326fc50279b20ff14284fb9aa1f1d194a559e5 100644 (file)
@@ -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) {