aboutsummaryrefslogtreecommitdiff
path: root/qga/commands-posix.c
diff options
context:
space:
mode:
authorTomáš Golembiovský <tgolembi@redhat.com>2020-07-21 17:40:41 +0200
committerMichael Roth <mdroth@linux.vnet.ibm.com>2020-09-12 20:37:48 -0500
commit2e4211cee49a666bf0e333011689b0981025879e (patch)
tree73497f535e93f28725d44edac1201bcb374565a1 /qga/commands-posix.c
parent23843c129d5e1ca360605e511a43a34faebb47c4 (diff)
qga: add command guest-get-devices for reporting VirtIO devices
Add command for reporting devices on Windows guest. The intent is not so much to report the devices but more importantly the driver (and its version) that is assigned to the device. This gives caller the information whether VirtIO drivers are installed and/or whether inadequate driver is used on a device (e.g. QXL device with base VGA driver). Example: [ { "driver-date": "2019-08-12", "driver-name": "Red Hat VirtIO SCSI controller", "driver-version": "100.80.104.17300", "address": { "type": "pci", "data": { "device-id": 4162, "vendor-id": 6900 } } }, ... ] Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> *remove redundant glib autoptr declaration for GuestDeviceInfo Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'qga/commands-posix.c')
-rw-r--r--qga/commands-posix.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index 744c2b5a5d..af5a58a9fd 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -2822,6 +2822,8 @@ GList *ga_command_blacklist_init(GList *blacklist)
blacklist = g_list_append(blacklist, g_strdup("guest-fstrim"));
#endif
+ blacklist = g_list_append(blacklist, g_strdup("guest-get-devices"));
+
return blacklist;
}
@@ -3042,3 +3044,10 @@ GuestOSInfo *qmp_guest_get_osinfo(Error **errp)
return info;
}
+
+GuestDeviceInfoList *qmp_guest_get_devices(Error **errp)
+{
+ error_setg(errp, QERR_UNSUPPORTED);
+
+ return NULL;
+}