Displaying 8 results from an estimated 8 matches for "udevp".
Did you mean:
devp
2020 Apr 03
0
Powercool PCRACK-1200VA patch update
...sb_get_string_simple(dev, index, buf, blen);
+}
+
+
+
/* On success, fill in the curDevice structure and return the report
* descriptor length. On failure, return -1.
* Note: When callback is not NULL, the report descriptor will be
@@ -152,7 +228,7 @@ static int libusb_open(usb_dev_handle **udevp,
USBDevice_t *curDevice, USBDevice
int ret, res;
unsigned char buf[20];
unsigned char *p;
- char string[256];
+ char string[USB_BUFLEN_MAX];
int i;
/* All devices use HID descriptor at index 0. However, some newer
* Eaton units have a light HID descriptor...
2007 Feb 16
1
Re: [nut-commits] svn commit r808 - in trunk: . drivers
...lure, return -1. Note: ReportDesc must point to a large enough
> buffer. There's no way to know the size ahead of time. Matcher is
> a linked list of matchers (see libhid.h), and the opened device
> - must match all of them. */
> -static int libusb_open(usb_dev_handle **udevp, HIDDevice *curDevice, HIDDeviceMatcher_t *matcher, unsigned char *ReportDesc, int mode)
> + must match all of them. Also note: the string components of
> + curDevice are filled with allocated strings that must later be
> + freed. */
> +static int libusb_open(usb_dev_handle **u...
2007 Aug 23
1
[nut-commits] svn commit r1073 - in trunk: . drivers
...gt; + free(data);
> + free(matcher);
> }
>
> /* ---------------------------------------------------------------------- */
> @@ -600,12 +651,12 @@
> /* Matcher is a linked list of matchers (see libhid.h), and the opened
> device must match all of them. On success, set *udevp and *hd and
> return hd. On failure, return NULL. Mode is MODE_OPEN or MODE_REOPEN. */
> -HIDDevice_t *HIDOpenDevice(hid_dev_handle_t **udevp, HIDDevice_t *hd, HIDDeviceMatcher_t *matcher, int mode)
> +HIDDevice_t *HIDOpenDevice(hid_dev_handle_t **udevp, HIDDevice_t *hd, HIDDeviceMatc...
2010 Apr 19
2
Too much logging from libusb.c (patch supplied)
...eport: No error
(and so on and so on)
I found the location where this is happening and did the following patch:
diff --git a/drivers/libusb.c b/drivers/libusb.c
index 50bfc7f..3eae478 100644
--- a/drivers/libusb.c
+++ b/drivers/libusb.c
@@ -353,7 +353,7 @@ static int libusb_open(usb_dev_handle **udevp, USBDevice_t *curDevice, USBDevice
*/
static int libusb_strerror(const int ret, const char *desc)
{
- if (ret > 0) {
+ if (ret >= 0) {
return ret;
}
I've been running that patched version since April 16th, monitoring two
UPSes (APC Back UPS XS...
2023 Nov 05
1
Passing hid_rep_index to libusb_get_config_descriptor is wrong?
...-) But it doesn't for me.
I traced what I think the problem is to this section in libusb1.c
diff --git a/drivers/libusb1.c b/drivers/libusb1.c
index 17f4b8f74..f49cc78aa 100644
--- a/drivers/libusb1.c
+++ b/drivers/libusb1.c
@@ -420,7 +420,7 @@ static int nut_libusb_open(libusb_device_handle **udevp,
upsdebugx(2, "Reading first configuration descriptor");
ret = libusb_get_config_descriptor(device,
- (uint8_t)usb_subdriver.hid_rep_index,
+ 0, //(uint8_t)usb_subdriver.hid_rep_index,
&am...
2023 Nov 05
1
Passing hid_rep_index to libusb_get_config_descriptor is wrong?
...I traced what I think the problem is to this section in libusb1.c
> diff --git a/drivers/libusb1.c b/drivers/libusb1.c
> index 17f4b8f74..f49cc78aa 100644
> --- a/drivers/libusb1.c
> +++ b/drivers/libusb1.c
> @@ -420,7 +420,7 @@ static int nut_libusb_open(libusb_device_handle
> **udevp,
>
> upsdebugx(2, "Reading first configuration descriptor");
> ret = libusb_get_config_descriptor(device,
> - (uint8_t)usb_subdriver.hid_rep_index,
> + 0, //(uint8_t)usb_subdriver.hid_rep_index,
>...
2023 Nov 05
1
Passing hid_rep_index to libusb_get_config_descriptor is wrong?
...he problem is to this section in libusb1.c
>> diff --git a/drivers/libusb1.c b/drivers/libusb1.c
>> index 17f4b8f74..f49cc78aa 100644
>> --- a/drivers/libusb1.c
>> +++ b/drivers/libusb1.c
>> @@ -420,7 +420,7 @@ static int nut_libusb_open(libusb_device_handle
>> **udevp,
>>
>> upsdebugx(2, "Reading first configuration descriptor");
>> ret = libusb_get_config_descriptor(device,
>> - (uint8_t)usb_subdriver.hid_rep_index,
>> + 0, //(uint8_t)usb_subdrive...
2023 Nov 05
1
Passing hid_rep_index to libusb_get_config_descriptor is wrong?
...ction in libusb1.c
>>> diff --git a/drivers/libusb1.c b/drivers/libusb1.c
>>> index 17f4b8f74..f49cc78aa 100644
>>> --- a/drivers/libusb1.c
>>> +++ b/drivers/libusb1.c
>>> @@ -420,7 +420,7 @@ static int nut_libusb_open(libusb_device_handle
>>> **udevp,
>>>
>>> upsdebugx(2, "Reading first configuration descriptor");
>>> ret = libusb_get_config_descriptor(device,
>>> - (uint8_t)usb_subdriver.hid_rep_index,
>>> + 0, //(...