[PATCH v2 04/21] virusb: Introduce virUSBDeviceGetPath

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We will need this function in near future so that we know what
/dev device corresponds to the USB device.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/libvirt_private.syms | 1 +
 src/util/virusb.c        | 5 +++++
 src/util/virusb.h        | 1 +
 3 files changed, 7 insertions(+)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index c1ed2c598..c91f3798f 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2634,6 +2634,7 @@ virUSBDeviceFree;
 virUSBDeviceGetBus;
 virUSBDeviceGetDevno;
 virUSBDeviceGetName;
+virUSBDeviceGetPath;
 virUSBDeviceGetUsedBy;
 virUSBDeviceListAdd;
 virUSBDeviceListCount;
diff --git a/src/util/virusb.c b/src/util/virusb.c
index 6a001a77b..8cd2f57f4 100644
--- a/src/util/virusb.c
+++ b/src/util/virusb.c
@@ -406,6 +406,11 @@ const char *virUSBDeviceGetName(virUSBDevicePtr dev)
     return dev->name;
 }
 
+const char *virUSBDeviceGetPath(virUSBDevicePtr dev)
+{
+    return dev->path;
+}
+
 unsigned int virUSBDeviceGetBus(virUSBDevicePtr dev)
 {
     return dev->bus;
diff --git a/src/util/virusb.h b/src/util/virusb.h
index f98ea2168..716e8c691 100644
--- a/src/util/virusb.h
+++ b/src/util/virusb.h
@@ -67,6 +67,7 @@ void virUSBDeviceGetUsedBy(virUSBDevicePtr dev,
                            const char **drv_name,
                            const char **dom_name);
 const char *virUSBDeviceGetName(virUSBDevicePtr dev);
+const char *virUSBDeviceGetPath(virUSBDevicePtr usb);
 
 unsigned int virUSBDeviceGetBus(virUSBDevicePtr dev);
 unsigned int virUSBDeviceGetDevno(virUSBDevicePtr dev);
-- 
2.11.0

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux