]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/mount.c
Update the Microsoft Visual Studio build to match the MinGW32 build.
[bacula/bacula] / bacula / src / stored / mount.c
index d88181a9c2b48c090e7a56ed62362dcfd2d61cc3..83494eb715fd0748a3a3066f6e0218856e810342 100644 (file)
@@ -57,7 +57,8 @@ bool mount_next_write_volume(DCR *dcr, bool release)
    DEV_BLOCK *block = dcr->block;
    int mode;
 
-   Dmsg1(150, "Enter mount_next_volume(release=%d)\n", release);
+   Dmsg2(150, "Enter mount_next_volume(release=%d) dev=%s\n", release,
+      dev->print_name());
 
    init_device_wait_timers(dcr);
 
@@ -164,9 +165,9 @@ mount_next_vol:
       mode = OPEN_READ_WRITE;
    }
    while (dev->open(dcr, mode) < 0) {
-      Dmsg0(000, "open_device failed\n");
+      Dmsg0(150, "open_device failed\n");
       if (dev->is_file() && dev->is_removable()) {
-         Dmsg0(000, "call scan_dir_for_vol\n");
+         Dmsg0(150, "call scan_dir_for_vol\n");
          if (dev->scan_dir_for_volume(dcr)) {
             break;                    /* got a valid volume */
          }
@@ -193,7 +194,7 @@ read_volume:
     */
    if (dev->has_cap(CAP_STREAM)) {
       vol_label_status = VOL_OK;
-      create_volume_label(dev, dcr->VolumeName, "Default");
+      create_volume_label(dev, dcr->VolumeName, "Default", false /* not DVD */);
       dev->VolHdr.LabelType = PRE_LABEL;
    } else {
       vol_label_status = read_dev_volume_label(dcr);
@@ -334,7 +335,7 @@ read_volume:
          dcr->VolumeName);
       if (!dev->eod()) {
          Jmsg(jcr, M_ERROR, 0, _("Unable to position to end of data on device %s: ERR=%s\n"),
-            dev->print_name(), strerror_dev(dev));
+            dev->print_name(), dev->bstrerror());
          mark_volume_in_error(dcr);
          goto mount_next_vol;
       }
@@ -394,7 +395,9 @@ read_volume:
       empty_block(block);             /* we used it for reading so set for write */
    }
    dev->set_append();
-   Dmsg0(150, "set APPEND, normal return from read_dev_for_append\n");
+   Dmsg1(150, "set APPEND, normal return from mount_next_write_volume. dev=%s\n",
+      dev->print_name());
+
    return true;
 }
 
@@ -418,7 +421,7 @@ static int try_autolabel(DCR *dcr)
       Dmsg0(150, "Create volume label\n");
       /* Create a new Volume label and write it to the device */
       if (!write_new_volume_label_to_dev(dcr, dcr->VolumeName,
-             dcr->pool_name)) {
+             dcr->pool_name, false /* defer DVD label */)) {
          Dmsg0(150, "!write_vol_label\n");
          mark_volume_in_error(dcr);
          return try_next_vol;