qemuDomainDiskInfo: Drop 'nodename' field

The field is only read in tests. Other code using it no longer exists.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa committed 2026-02-12 16:45:34 +01:00
1 parent 0d3ef7cb71
commit 861be1078e
4 files changed
+3 -8

No files matched your search

-1
View File
@@ -364,7 +364,6 @@ struct qemuDomainDiskInfo {
bool tray_open;
bool empty;
int io_status;
char *nodename;
};
#define QEMU_DOMAIN_CHR_SOURCE_PRIVATE(dev) \
-1
View File
@@ -1947,7 +1947,6 @@ qemuDomainDiskInfoFree(void *value)
{
struct qemuDomainDiskInfo *info = value;
g_free(info->nodename);
g_free(info);
}
+1 -4
View File
@@ -2304,7 +2304,6 @@ qemuMonitorJSONBlockInfoAdd(GHashTable *table,
tmp = g_new0(struct qemuDomainDiskInfo, 1);
*tmp = *info;
tmp->nodename = g_strdup(info->nodename);
g_hash_table_insert(table, g_strdup(entryname), tmp);
@@ -2360,9 +2359,7 @@ qemuMonitorJSONGetBlockInfo(qemuMonitor *mon,
info.tray = true;
/* presence of 'inserted' notifies that a medium is in the device */
if ((image = virJSONValueObjectGetObject(dev, "inserted"))) {
info.nodename = (char *) virJSONValueObjectGetString(image, "node-name");
} else {
if (!(image = virJSONValueObjectGetObject(dev, "inserted"))) {
info.empty = true;
}
+2 -2
View File
@@ -1354,9 +1354,9 @@ static void
testQemuMonitorJSONGetBlockInfoPrint(const struct qemuDomainDiskInfo *d)
{
VIR_TEST_VERBOSE("removable: %d, tray: %d, tray_open: %d, empty: %d, "
"io_status: %d, nodename: '%s'",
"io_status: %d",
d->removable, d->tray, d->tray_open, d->empty,
d->io_status, NULLSTR(d->nodename));
d->io_status);
}