return write_len;
}
+/* to make the difference with an "real" auto changer */
+bool DEVICE::is_virtual_autochanger() const {
+ return device->changer_command &&
+ (device->changer_command[0] == 0 ||
+ strcmp(device->changer_command, "/dev/null") == 0);
+}
+
/* Return the resource name for the device */
const char *DEVICE::name() const
{
void set_worm(bool is_worm) { m_is_worm = is_worm; }
bool do_checksum() const { return (capabilities & CAP_BLOCKCHECKSUM) != 0; }
int is_autochanger() const { return capabilities & CAP_AUTOCHANGER; }
+ bool is_virtual_autochanger() const;
int requires_mount() const { return capabilities & CAP_REQMOUNT; }
int is_removable() const { return capabilities & CAP_REM; }
bool is_tape() const { return (dev_type == B_TAPE_DEV ||
break;
}
/* Send autochanger slot status */
- if (dev->is_autochanger()) {
+ if (dev->is_autochanger() && !dev->is_virtual_autochanger()) {
if (dev->get_slot() > 0) {
len = Mmsg(msg, _(" Slot %d %s loaded in drive %d.\n"),
dev->get_slot(), dev->is_open()?"is": "was last", dev->drive_index);
DEDUPRES *dedup; /* pointer to dedup resource */
/* The following are set at runtime */
- DEVICE *dev; /* Pointer to phyical dev -- set at runtime */
+ DEVICE *dev; /* Pointer to physical dev -- set at runtime */
AUTOCHANGER *changer_res; /* pointer to changer res if any */
int init_state; /* 0 -> 'B'uzy -> ( 'R'eady | 0 (retry) ) */