mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
qemu: Drop 'empty' filed from 'qemuDomainDiskInfo'
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 <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
1 parent
56f7dd88d4
commit
52e09a7875
3 files changed
+2
-12
No files matched your search
@@ -360,7 +360,6 @@ struct qemuDomainDiskInfo {
|
||||
bool removable;
|
||||
bool tray;
|
||||
bool tray_open;
|
||||
bool empty;
|
||||
int io_status;
|
||||
};
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user