On 05/03/2012 01:17 AM, Osier Yang wrote:
On 2012年05月01日 16:16, Guannan Ren wrote:
usbFindDevice():get usb device according to
idVendor, idProduct, bus, device
it is the most strict search
usbFindDevByBus():get usb device according to bus, device
Should we name it as usbFindDevByAddress? Given that both 'bus'
and 'device' are used to find the device actually.
the term 'address' for usb device is used by kernel
maybe not a good name.
The codes has been changed according to the following comments
{
DIR *dir = NULL;
- int ret = -1, found = 0;
+ int found = 0;
char *ignore = NULL;
struct dirent *de;
+ usbDeviceList *list = NULL, *ret = NULL;
+ usbDevice *usb;
+
+ if (!(list = usbDeviceListNew()))
virReportOOMError();
usbDeviceListNew has raised OOM Error in that case.
Guannan Ren
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list