From: Peter Krempa <[email protected]> The value is no longer used so drop the field and also the code which fetches it from the QMP command reply.
Signed-off-by: Peter Krempa <[email protected]> --- src/qemu/qemu_domain.h | 1 - src/qemu/qemu_monitor_json.c | 6 ------ tests/qemumonitorjsontest.c | 7 ++----- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 20d6bd316c..0f975a22fc 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -360,7 +360,6 @@ struct qemuDomainDiskInfo { bool removable; bool tray; bool tray_open; - bool empty; int io_status; }; diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index a7e095a648..bf9e59c0b6 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2323,7 +2323,6 @@ qemuMonitorJSONGetBlockInfo(qemuMonitor *mon, for (i = 0; i < virJSONValueArraySize(devices); i++) { virJSONValue *dev; - virJSONValue *image; struct qemuDomainDiskInfo info = { false }; const char *thisdev; const char *status; @@ -2358,11 +2357,6 @@ qemuMonitorJSONGetBlockInfo(qemuMonitor *mon, 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); diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index efa2400750..699b75ce2d 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1353,10 +1353,8 @@ testQemuMonitorJSONqemuMonitorJSONGetBalloonInfo(const void *opaque) 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); } @@ -1418,7 +1416,6 @@ testQemuMonitorJSONqemuMonitorJSONGetBlockInfo(const void *opaque) info->removable = true; info->tray = true; - info->empty = true; if (virHashAddEntry(expectedBlockDevices, "ide0-1-1", info) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", -- 2.53.0
