bstrncpy(dcr->media_type, vol->MediaType, sizeof(dcr->media_type));
dcr->VolCatInfo.Slot = vol->Slot;
dcr->VolCatInfo.InChanger = vol->Slot > 0;
- if (reserve_volume(dcr, dcr->VolumeName) == NULL) {
- Dmsg2(100, "Could not reserve volume %s on %s\n", dcr->VolumeName,
- dcr->dev->print_name());
- Jmsg2(jcr, M_FATAL, 0, _("Could not reserve volume %s on %s\n"), dcr->VolumeName,
- dcr->dev->print_name());
- goto get_out;
- }
- if (dev->vol && dev->vol->is_swapping()) {
- dev->vol->set_slot(vol->Slot);
- Dmsg3(100, "swapping: slot=%d Vol=%s dev=%s\n", dev->vol->get_slot(),
- dev->vol->vol_name, dev->print_name());
- }
/*
* If the MediaType requested for this volume is not the
Dmsg1(50, "Media Type change. New device %s chosen.\n", dev->print_name());
bstrncpy(dcr->VolumeName, vol->VolumeName, sizeof(dcr->VolumeName));
+ bstrncpy(dcr->VolCatInfo.VolCatName, vol->VolumeName, sizeof(dcr->VolCatInfo.VolCatName));
bstrncpy(dcr->media_type, vol->MediaType, sizeof(dcr->media_type));
dcr->VolCatInfo.Slot = vol->Slot;
+ dcr->VolCatInfo.InChanger = vol->Slot > 0;
bstrncpy(dcr->pool_name, store->pool_name, sizeof(dcr->pool_name));
bstrncpy(dcr->pool_type, store->pool_type, sizeof(dcr->pool_type));
} else {
}
}
+ if (reserve_volume(dcr, dcr->VolumeName) == NULL) {
+ Dmsg2(100, "Could not reserve volume %s on %s\n", dcr->VolumeName,
+ dcr->dev->print_name());
+ Jmsg2(jcr, M_FATAL, 0, _("Could not reserve volume %s on %s\n"), dcr->VolumeName,
+ dcr->dev->print_name());
+ goto get_out;
+ }
+ if (dev->vol && dev->vol->is_swapping()) {
+ dev->vol->set_slot(vol->Slot);
+ Dmsg3(100, "swapping: slot=%d Vol=%s dev=%s\n", dev->vol->get_slot(),
+ dev->vol->vol_name, dev->print_name());
+ }
+
init_device_wait_timers(dcr);