From: Cédric Bosdonnat <cbosdon...@suse.com>

Finding an USB device from the vendor/device values will be needed
by libxl driver to convert from vendor/device to bus/dev addresses.

Signed-off-by: Jim Fehlig <jfeh...@suse.com>
---

V2:
 Remove unnecessary ATTRIBUTE_NONNULL

 src/libvirt_private.syms | 1 +
 src/util/virhostdev.c    | 2 +-
 src/util/virhostdev.h    | 6 ++++++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 419c33d..de8b1fe 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1646,6 +1646,7 @@ virHookPresent;
 
 
 # util/virhostdev.h
+virHostdevFindUSBDevice;
 virHostdevManagerGetDefault;
 virHostdevPCINodeDeviceDetach;
 virHostdevPCINodeDeviceReAttach;
diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c
index 9b5ca6f..9c2262e 100644
--- a/src/util/virhostdev.c
+++ b/src/util/virhostdev.c
@@ -1178,7 +1178,7 @@ virHostdevMarkUSBDevices(virHostdevManagerPtr mgr,
 }
 
 
-static int
+int
 virHostdevFindUSBDevice(virDomainHostdevDefPtr hostdev,
                         bool mandatory,
                         virUSBDevicePtr *usb)
diff --git a/src/util/virhostdev.h b/src/util/virhostdev.h
index c451981..f2f51bd 100644
--- a/src/util/virhostdev.h
+++ b/src/util/virhostdev.h
@@ -66,6 +66,12 @@ virHostdevPreparePCIDevices(virHostdevManagerPtr hostdev_mgr,
                             unsigned int flags)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
     ATTRIBUTE_NONNULL(4);
+
+int
+virHostdevFindUSBDevice(virDomainHostdevDefPtr hostdev,
+                        bool mandatory,
+                        virUSBDevicePtr *usb)
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
 int
 virHostdevPrepareUSBDevices(virHostdevManagerPtr hostdev_mgr,
                             const char *drv_name,
-- 
2.1.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to