]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/mount.c
Other modifications outside DVD functions. (@kern please double-check this)
[bacula/bacula] / bacula / src / stored / mount.c
index 535015a1d679322dfe40a1a8d9cbb96dd36d24a9..bf71087cf5bc51ed5af1ac12d4c7c5220b8d1172 100644 (file)
@@ -48,7 +48,7 @@ bool mount_next_write_volume(DCR *dcr, bool release)
    JCR *jcr = dcr->jcr;
    DEV_BLOCK *block = dcr->block;
 
-   Dmsg0(100, "Enter mount_next_volume()\n");
+   Dmsg1(100, "Enter mount_next_volume(release=%d)\n", release);
 
    init_device_wait_timers(dcr);
 
@@ -123,10 +123,12 @@ mount_next_vol:
     *   we will err, recurse and ask the operator the next time.
     */
    if (!release && dev->is_tape() && dev_cap(dev, CAP_AUTOMOUNT)) {
+      Dmsg0(100, "(1)Ask=0");
       ask = false;                 /* don't ask SYSOP this time */
    }
    /* Don't ask if not removable */
    if (!dev_cap(dev, CAP_REM)) {
+      Dmsg0(100, "(2)Ask=0");
       ask = false;
    }
    Dmsg2(100, "Ask=%d autochanger=%d\n", ask, autochanger);
@@ -147,7 +149,7 @@ mount_next_vol:
 
    /* Ensure the device is open */
    if (!open_device(dcr)) {
-      if (dev->poll) {
+      if ((dev->poll) || (dev->is_dvd())) {
          goto mount_next_vol;
       } else {
          return false;
@@ -281,6 +283,10 @@ read_volume:
             dcr->VolumeName, dev->print_name());
          goto read_volume;      /* read label we just wrote */
       }
+      if (!dev_cap(dev, CAP_LABEL) && dcr->VolCatInfo.VolCatBytes == 0) {
+         Jmsg(jcr, M_INFO, 0, _("Warning device %s not configured to autolabel Volumes.\n"), 
+            dev->print_name());
+      }
       /* If not removable, Volume is broken */
       if (!dev_cap(dev, CAP_REM)) {
          Jmsg(jcr, M_WARNING, 0, _("Volume \"%s\" not on device %s.\n"),
@@ -438,7 +444,7 @@ void release_volume(DCR *dcr)
    if (dev->is_open()) {
       offline_or_rewind_dev(dev);
    }
-   Dmsg0(190, "===== release_volume ===\n");
+   Dmsg0(190, "release_volume\n");
 }
 
 /*