]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Clarify SD vbackup device error message
authorKern Sibbald <kern@sibbald.com>
Mon, 17 Aug 2020 16:38:48 +0000 (18:38 +0200)
committerKern Sibbald <kern@sibbald.com>
Mon, 17 Aug 2020 16:38:48 +0000 (18:38 +0200)
bacula/src/stored/vbackup.c

index a78227802c7e0614ff0aba02d308d44aac0bf471..c91d0e4045f67c1b6c28b8a94fbbd378094b5728 100644 (file)
@@ -69,8 +69,12 @@ bool do_vbackup(JCR *jcr)
 
    Dmsg1(20, "Start read data. newbsr=%d\n", jcr->use_new_match_all);
 
-   if (!jcr->read_dcr || !jcr->dcr) {
-      Jmsg(jcr, M_FATAL, 0, _("Read and write devices not properly initialized.\n"));
+   if (!jcr->read_dcr) {
+      Jmsg(jcr, M_FATAL, 0, _("Read device not initialized or defined for this job.\n"));
+      goto bail_out;
+   }
+   if (!jcr->dcr) {
+      Jmsg(jcr, M_FATAL, 0, _("Write device not initialized or defined for this job.\n"));
       goto bail_out;
    }
    Dmsg2(100, "read_dcr=%p write_dcr=%p\n", jcr->read_dcr, jcr->dcr);