]> git.sur5r.net Git - bacula/bacula/commitdiff
Force close the drive
authorKern Sibbald <kern@sibbald.com>
Mon, 26 May 2003 18:31:09 +0000 (18:31 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 26 May 2003 18:31:09 +0000 (18:31 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@551 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/stored/btape.c

index c20fad8df7c582380fe290cf5452ad17ee910d67..2b8b669f478383a9cea0a549ffb870650a65e631 100644 (file)
@@ -1652,6 +1652,10 @@ int      dir_find_next_appendable_volume(JCR *jcr)
 
 int dir_ask_sysop_to_mount_volume(JCR *jcr, DEVICE *dev)
 {
+   if (dev_cap(dev, CAP_OFFLINEUNMOUNT)) {
+      offline_dev(dev);
+   }
+   force_close_dev(dev);
    Pmsg1(-1, "%s", dev->errmsg);           /* print reason */
    fprintf(stderr, "Mount Volume \"%s\" on device %s and press return when ready: ",
       jcr->VolumeName, dev_name(dev));
@@ -1661,6 +1665,10 @@ int dir_ask_sysop_to_mount_volume(JCR *jcr, DEVICE *dev)
 
 int dir_ask_sysop_to_mount_next_volume(JCR *jcr, DEVICE *dev)
 {
+   if (dev_cap(dev, CAP_OFFLINEUNMOUNT)) {
+      offline_dev(dev);
+   }
+   force_close_dev(dev);
    fprintf(stderr, "Mount next Volume on device %s and press return when ready: ",
       dev_name(dev));
    getchar();