]> git.sur5r.net Git - bacula/bacula/commitdiff
Add debug
authorKern Sibbald <kern@sibbald.com>
Fri, 4 Jul 2008 16:58:35 +0000 (16:58 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 4 Jul 2008 16:58:35 +0000 (16:58 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7306 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/stored/label.c
bacula/src/stored/mount.c

index e2b9f548ea89dde27a87343277a87dd14dd1dd3b..1c2d0083604423c769c346f4993fc77b4b45fc69 100644 (file)
@@ -324,6 +324,10 @@ bool write_new_volume_label_to_dev(DCR *dcr, const char *VolName,
 
    Dmsg0(150, "write_volume_label()\n");
    empty_block(dcr->block);
+   if (*VolName == 0) {
+      Pmsg0(0, "=== ERROR: write_new_volume_label_to_dev called with NULL VolName\n");
+      goto bail_out;
+   }
 
    if (relabel) {
       volume_unused(dcr);             /* mark current volume unused */
index b6f0f02e6f0fb51c52528fd15912cf60d113e49a..b4aa2e26aecb76175b5565b064cab3877ee76be8 100644 (file)
@@ -624,7 +624,8 @@ int DCR::try_autolabel(bool opened)
       /* Create a new Volume label and write it to the device */
       if (!write_new_volume_label_to_dev(dcr, VolumeName,
              pool_name, false, /* no relabel */ false /* defer DVD label */)) {
-         Dmsg0(150, "!write_vol_label\n");
+         Dmsg2(150, "write_vol_label failed. vol=%s, pool=%s\n",
+           VolumeName, pool_name);
          if (opened) { 
             mark_volume_in_error();
          }