aboutsummaryrefslogtreecommitdiff
path: root/qga/commands-win32.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-10-21 09:15:17 +0200
committerMichael Roth <michael.roth@amd.com>2020-11-02 08:14:35 -0600
commitb519e2e982f7f5368c5976ca44d9ca7bbb7a3378 (patch)
treebee296d57a4ec0785cf99b42d7236541e58e1d07 /qga/commands-win32.c
parent2c6605389c1f76973d92b69b85d40d94b8f1092c (diff)
qga: Rename guest-get-devices return member 'address' to 'id'
Member 'address' is union GuestDeviceAddress with a single branch GuestDeviceAddressPCI, containing PCI vendor ID and device ID. This is not a PCI address. Type GuestPCIAddress is. Messed up in recent commit 2e4211cee4 "qga: add command guest-get-devices for reporting VirtIO devices". Rename type GuestDeviceAddressPCI to GuestDeviceIdPCI, type GuestDeviceAddress to GuestDeviceId, and member 'address' to 'id'. Document the member properly while there. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Michael Roth <michael.roth@amd.com>
Diffstat (limited to 'qga/commands-win32.c')
-rw-r--r--qga/commands-win32.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 0c3c05484f..879b02b6c3 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -2390,22 +2390,22 @@ GuestDeviceInfoList *qmp_guest_get_devices(Error **errp)
}
for (j = 0; hw_ids[j] != NULL; j++) {
GMatchInfo *match_info;
- GuestDeviceAddressPCI *address;
+ GuestDeviceIdPCI *id;
if (!g_regex_match(device_pci_re, hw_ids[j], 0, &match_info)) {
continue;
}
skip = false;
- address = g_new0(GuestDeviceAddressPCI, 1);
+ id = g_new0(GuestDeviceIdPCI, 1);
vendor_id = g_match_info_fetch(match_info, 1);
device_id = g_match_info_fetch(match_info, 2);
- address->vendor_id = g_ascii_strtoull(vendor_id, NULL, 16);
- address->device_id = g_ascii_strtoull(device_id, NULL, 16);
+ id->vendor_id = g_ascii_strtoull(vendor_id, NULL, 16);
+ id->device_id = g_ascii_strtoull(device_id, NULL, 16);
- device->address = g_new0(GuestDeviceAddress, 1);
- device->has_address = true;
- device->address->type = GUEST_DEVICE_ADDRESS_KIND_PCI;
- device->address->u.pci.data = address;
+ device->id = g_new0(GuestDeviceId, 1);
+ device->has_id = true;
+ device->id->type = GUEST_DEVICE_ID_KIND_PCI;
+ device->id->u.pci.data = id;
g_match_info_free(match_info);
break;