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

Re: [libvirt] [PATCH 1/3] usb: create functions to search usb device accurately

On 05/04/2012 01:48 PM, Osier Yang wrote:
On 2012年05月04日 12:39, Guannan Ren wrote:
On 05/04/2012 05:38 AM, Eric Blake wrote:
On 05/03/2012 03:21 PM, Eric Blake wrote:
On 05/03/2012 04:51 AM, Guannan Ren wrote:
usbFindDevice():get usb device according to
idVendor, idProduct, bus, device
it is the exact match of the four parameters

usbFindDeviceByBus():get usb device according to bus, device
it returns only one usb device same as usbFindDevice

usbFindDeviceByVendor():get usb device according to idVendor,idProduct
it probably returns multiple usb devices.

usbDeviceSearch(): a helper function to do the actual search
src/libvirt_private.syms | 2 +
src/util/hostusb.c | 209 +++++++++++++++++++++++++++++++++-------------
src/util/hostusb.h | 22 ++++--
3 files changed, 170 insertions(+), 63 deletions(-)
This patch doesn't even compile!

qemu/qemu_hostdev.c: In function 'qemuPrepareHostdevUSBDevices':
qemu/qemu_hostdev.c:599:33: error: too few arguments to function
../src/util/hostusb.h:40:13: note: declared here

You can't change the signature of usbFindDevice unless you update all
callers in the same patch.

I compiled it and tested it , then sent it out.
I think the changes on usbFindDevice caller is in PATCH2/3 and PATCH 3/3
"usb = usbFindDevice(vendor, product, bus, device);" are there.

No, every patch shouldn't break the build. You have to update
all callers of usbFindDevice together with this patch.


          Eric, Osier, Thanks, I really don't know about this.
The v4 fixed the building break problem, each patch is standalone.

          Guannan Ren

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