Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- Bacula® is a registered trademark of John Walker.
+ Bacula® is a registered trademark of Kern Sibbald.
The licensor of Bacula is the Free Software Foundation Europe
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
free_volume(dev); /* Free any volume associated with this drive */
free_pool_memory(changer);
}
- dev->clear_unload();
+ if (ok) {
+ dev->clear_unload();
+ }
return ok;
}
break;
}
if (dev->is_busy()) {
- Jmsg(dcr->jcr, M_WARNING, 0, _("Volume \"%s\" is in use by device %s\n"),
- dcr->VolumeName, dev->print_name());
+ Jmsg(dcr->jcr, M_WARNING, 0, _("Volume \"%s\" wanted on %s is in use by device %s\n"),
+ dcr->VolumeName, dcr->dev->print_name(), dev->print_name());
Dmsg4(100, "Vol %s for dev=%s is busy dev=%s slot=%d\n",
dcr->VolumeName, dcr->dev->print_name(), dev->print_name(), dev->get_slot());
Dmsg2(100, "num_writ=%d reserv=%d\n", dev->num_writers, dev->num_reserved());
+ volume_unused(dcr);
return false;
}
return unload_dev(dcr, dev);
Dmsg2(100, "Slot %d unloaded %s\n", dev->get_slot(), dev->print_name());
dev->set_slot(0); /* nothing loaded */
}
- dev->clear_unload();
+ if (ok) {
+ dev->clear_unload();
+ }
unlock_changer(dcr);
dev->dunlock();
dir->fsend(_("3996 Open bpipe failed.\n"));
goto bail_out;
}
- if (strcmp(cmd, "list") == 0) {
+ if (bstrcmp(cmd, "list") || bstrcmp(cmd, "listall")) {
/* Get output from changer */
while (fgets(dir->msg, len, bpipe->rfd)) {
dir->msglen = strlen(dir->msg);