From cce910f219d3875c1c29aed70378d030f7110e01 Mon Sep 17 00:00:00 2001 From: Kfir Manor Date: Sun, 20 Nov 2022 16:00:44 +0200 Subject: qga:/qga-win: skip getting pci info for USB disks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Skip getting PCI info from disks type USB and give them an empty PCI address instead. Signed-off-by: Kfir Manor Reviewed-by: Konstantin Kostiuk Reviewed-by: Marc-André Lureau Signed-off-by: Konstantin Kostiuk --- qga/commands-win32.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'qga') diff --git a/qga/commands-win32.c b/qga/commands-win32.c index bd0f3cc..b5fee6a 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -874,10 +874,14 @@ static void get_single_disk_info(int disk_number, * if that doesn't hold since that suggests some other unexpected * breakage */ - disk->pci_controller = get_pci_info(disk_number, &local_err); - if (local_err) { - error_propagate(errp, local_err); - goto err_close; + if (disk->bus_type == GUEST_DISK_BUS_TYPE_USB) { + disk->pci_controller = get_empty_pci_address(); + } else { + disk->pci_controller = get_pci_info(disk_number, &local_err); + if (local_err) { + error_propagate(errp, local_err); + goto err_close; + } } if (disk->bus_type == GUEST_DISK_BUS_TYPE_SCSI || disk->bus_type == GUEST_DISK_BUS_TYPE_IDE -- cgit v1.1