return -1;
}
- if (virJSONValueObjectGetBoolean(dev, "removable", &info.removable) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("cannot read %1$s value"),
- "removable");
- return -1;
- }
-
/* 'tray_open' is present only if the device has a tray */
if (virJSONValueObjectGetBoolean(dev, "tray_open", &info.tray_open) == 0)
info.tray = true;
{
qemuDomainDiskPrivate *diskpriv = QEMU_DOMAIN_DISK_PRIVATE(disk);
- if (info->removable) {
- if (info->tray) {
- if (info->tray_open)
- disk->tray_status = VIR_DOMAIN_DISK_TRAY_OPEN;
- else
- disk->tray_status = VIR_DOMAIN_DISK_TRAY_CLOSED;
- }
+ if (info->tray) {
+ if (info->tray_open)
+ disk->tray_status = VIR_DOMAIN_DISK_TRAY_OPEN;
+ else
+ disk->tray_status = VIR_DOMAIN_DISK_TRAY_CLOSED;
}
diskpriv->tray = info->tray;
static void
testQemuMonitorJSONGetBlockInfoPrint(const struct qemuDomainDiskInfo *d)
{
- VIR_TEST_VERBOSE("removable: %d, tray: %d, tray_open: %d, io_status: %d",
- d->removable, d->tray, d->tray_open, d->io_status);
+ VIR_TEST_VERBOSE("tray: %d, tray_open: %d, io_status: %d",
+ d->tray, d->tray_open, d->io_status);
}
info = g_new0(struct qemuDomainDiskInfo, 1);
- info->removable = true;
info->tray = true;
if (virHashAddEntry(expectedBlockDevices, "ide0-1-0", info) < 0) {
info = g_new0(struct qemuDomainDiskInfo, 1);
- info->removable = true;
info->tray = true;
if (virHashAddEntry(expectedBlockDevices, "ide0-1-1", info) < 0) {