[libvirt] [PATCH 1/8] util: new function virPCIDeviceGetVFIOGroupDev

2013-04-25 Thread Laine Stump
Given a virPCIDevice, this function returns the path for the device that controls the vfio group the device belongs to, e.g. /dev/vfio/15. --- src/libvirt_private.syms | 1 + src/util/virpci.c| 34 ++ src/util/virpci.h| 2 ++ 3 files changed, 37

Re: [libvirt] [PATCH 1/8] util: new function virPCIDeviceGetVFIOGroupDev

2013-04-25 Thread Eric Blake
On 04/25/2013 11:57 AM, Laine Stump wrote: Given a virPCIDevice, this function returns the path for the device that controls the vfio group the device belongs to, e.g. /dev/vfio/15. --- +if (virAsprintf(groupDev, /dev/vfio/%s, basename(groupPath)) 0) { We shouldn't be using basename()

Re: [libvirt] [PATCH 1/8] util: new function virPCIDeviceGetVFIOGroupDev

2013-04-25 Thread Laine Stump
On 04/25/2013 04:06 PM, Eric Blake wrote: On 04/25/2013 11:57 AM, Laine Stump wrote: Given a virPCIDevice, this function returns the path for the device that controls the vfio group the device belongs to, e.g. /dev/vfio/15. --- +if (virAsprintf(groupDev, /dev/vfio/%s,