aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKfir Manor <kfir@daynix.com>2022-11-20 16:00:44 +0200
committerKonstantin Kostiuk <kkostiuk@redhat.com>2022-12-20 15:54:41 +0200
commitcce910f219d3875c1c29aed70378d030f7110e01 (patch)
tree745ecd1602dbfe06df999f58ad77e9176e859537
parent8e12ec8ee301632b0fabc97489ee5db8fe0d6851 (diff)
downloadqemu-cce910f219d3875c1c29aed70378d030f7110e01.zip
qemu-cce910f219d3875c1c29aed70378d030f7110e01.tar.gz
qemu-cce910f219d3875c1c29aed70378d030f7110e01.tar.bz2
qga:/qga-win: skip getting pci info for USB disks
Skip getting PCI info from disks type USB and give them an empty PCI address instead. Signed-off-by: Kfir Manor <kfir@daynix.com> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
-rw-r--r--qga/commands-win32.c12
1 files changed, 8 insertions, 4 deletions
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