[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 2/6] qga:/qga-win: skip getting pci info for USB disks
From: |
Konstantin Kostiuk |
Subject: |
[PULL v2 2/6] qga:/qga-win: skip getting pci info for USB disks |
Date: |
Sat, 17 Dec 2022 11:07:36 +0200 |
From: Kfir Manor <kfir@daynix.com>
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>
---
qga/commands-win32.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index bd0f3cccfe..b5fee6a2cd 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
--
2.25.1
- [PULL v2 0/6] QEMU Guest Agent misc patches, Konstantin Kostiuk, 2022/12/17
- [PULL v2 3/6] qga: Add initial OpenBSD and NetBSD support, Konstantin Kostiuk, 2022/12/17
- [PULL v2 1/6] qga:/qga-win: adding a empty PCI address creation function, Konstantin Kostiuk, 2022/12/17
- [PULL v2 2/6] qga:/qga-win: skip getting pci info for USB disks,
Konstantin Kostiuk <=
- [PULL v2 4/6] qga-win: add logging to Windows event log, Konstantin Kostiuk, 2022/12/17
- [PULL v2 5/6] qga: map GLib log levels to system levels, Konstantin Kostiuk, 2022/12/17
- [PULL v2 6/6] qga-win: choose the right libpcre version to include in MSI package, Konstantin Kostiuk, 2022/12/17
- Re: [PULL v2 0/6] QEMU Guest Agent misc patches, Peter Maydell, 2022/12/17