for (i = 0; i < virJSONValueArraySize(devices); i++) {
virJSONValue *dev;
- virJSONValue *image;
struct qemuDomainDiskInfo info = { false };
const char *thisdev;
const char *status;
if (virJSONValueObjectGetBoolean(dev, "tray_open", &info.tray_open) == 0)
info.tray = true;
- /* presence of 'inserted' notifies that a medium is in the device */
- if (!(image = virJSONValueObjectGetObject(dev, "inserted"))) {
- info.empty = true;
- }
-
/* Missing io-status indicates no error */
if ((status = virJSONValueObjectGetString(dev, "io-status"))) {
info.io_status = qemuMonitorBlockIOStatusToError(status);
static void
testQemuMonitorJSONGetBlockInfoPrint(const struct qemuDomainDiskInfo *d)
{
- VIR_TEST_VERBOSE("removable: %d, tray: %d, tray_open: %d, empty: %d, "
- "io_status: %d",
- d->removable, d->tray, d->tray_open, d->empty,
- d->io_status);
+ VIR_TEST_VERBOSE("removable: %d, tray: %d, tray_open: %d, io_status: %d",
+ d->removable, d->tray, d->tray_open, d->io_status);
}
info->removable = true;
info->tray = true;
- info->empty = true;
if (virHashAddEntry(expectedBlockDevices, "ide0-1-1", info) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",