]> xenbits.xensource.com Git - libvirt.git/commitdiff
virusb: Introduce virUSBDeviceGetPath
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 16 Nov 2016 14:26:59 +0000 (15:26 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 15 Dec 2016 08:25:16 +0000 (09:25 +0100)
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@redhat.com>
src/libvirt_private.syms
src/util/virusb.c
src/util/virusb.h

index bb47b1f81fa67f807f95c70f24acd57bd4d24d48..416d40c2e3daf8dd2de23c84aac0329af4b999d3 100644 (file)
@@ -2634,6 +2634,7 @@ virUSBDeviceFree;
 virUSBDeviceGetBus;
 virUSBDeviceGetDevno;
 virUSBDeviceGetName;
+virUSBDeviceGetPath;
 virUSBDeviceGetUsedBy;
 virUSBDeviceListAdd;
 virUSBDeviceListCount;
index 6a001a77bea04455bd5ed2646155cf07dbef0851..8cd2f57f493afe05eed643017f6b7f13407d6b5a 100644 (file)
@@ -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;
index f98ea21682ac6f860ed6ab0ead34e91e34e189bb..716e8c6915746ed9ffa6d2adf8b615cf308fc81d 100644 (file)
@@ -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);