From: Kern Sibbald Date: Mon, 26 May 2003 18:31:09 +0000 (+0000) Subject: Force close the drive X-Git-Tag: Release-1.31~105 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=926ffd2af1f622804da78918c88ac6abcde89274;p=bacula%2Fbacula Force close the drive git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@551 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/stored/btape.c b/bacula/src/stored/btape.c index c20fad8df7..2b8b669f47 100644 --- a/bacula/src/stored/btape.c +++ b/bacula/src/stored/btape.c @@ -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();