Displaying 8 results from an estimated 8 matches for "usbdevice_t".
Did you mean:
usbdevice
2011 Aug 27
1
[PATCH 3/3] Fix pointer check on wrong variable
...--
drivers/usb-common.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/usb-common.c b/drivers/usb-common.c
index e51f3cf..e459872 100644
--- a/drivers/usb-common.c
+++ b/drivers/usb-common.c
@@ -116,7 +116,7 @@ int USBNewExactMatcher(USBDeviceMatcher_t **matcher, USBDevice_t *hd)
USBDevice_t *data;
m = malloc(sizeof(*m));
- if (!matcher) {
+ if (!m) {
return -1;
}
--
1.7.4.4
2020 Apr 03
0
Powercool PCRACK-1200VA patch update
...tring_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 at index 0, a...
2010 Mar 25
1
new TSSHARA SOHO II ups
...driver_s {
char *name; /* name of this
subdriver */
char *version; /* version of this
subdriver */
int (*open)(usb_dev_handle **sdevp, /* try to open the next
available */
USBDevice_t *curDevice, /* device matching
USBDeviceMatcher_t */
USBDeviceMatcher_t *matcher,
int (*callback)(usb_dev_handle *udev, USBDevice_t *hd,
unsigned char *rdbuf, int rdlen));
void (*close)(usb_dev_handle *sdev);
int (*get_report)(usb_dev_handle...
2010 Apr 19
2
Too much logging from libusb.c (patch supplied)
...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 1000 and Cybe...
2020 Apr 03
0
Patch to support Powercool PCRACK-1200VA
... langid_fix=0x409
buflen_fix=102
desc = "POWERCOOL"
Patch is below, I hope it is of assistance.
Regards,
Ian
diff --git a/drivers/nutdrv_qx.c b/drivers/nutdrv_qx.c
index bb526608..75bb97f8 100644
--- a/drivers/nutdrv_qx.c
+++ b/drivers/nutdrv_qx.c
@@ -422,6 +422,7 @@ static USBDevice_t usbdevice;
static USBDeviceMatcher_t *reopen_matcher = NULL;
static USBDeviceMatcher_t *regex_matcher = NULL;
static int langid_fix = -1;
+static int buflen_fix = -1;
static int (*subdriver_command)(const char *cmd, char *buf, size_...
2014 Aug 11
1
Cyberpower Value1200E might not need 0.667 battery scaling
...= 0;
> +
> +/*! If the ratio of the battery voltage to the nominal battery voltage exceeds
> + * this factor, we assume that the battery voltage needs to be scaled by 2/3.
> + */
> +static const double battery_voltage_sanity_check = 1.4;
>
> static void *cps_battery_scale(USBDevice_t *device)
> {
> - battery_scale = 0.667;
> + might_need_battery_scale = 1;
> return NULL;
> }
>
> /* USB IDs device table */
> static usb_device_id_t cps_usb_device_table[] = {
> - /* 900AVR/BC900D, CP1200AVR/BC1200D */
> + /* 900AVR/BC900D */
> { US...
2014 Aug 09
0
Cyberpower Value1200E might not need 0.667 battery scaling
On Aug 8, 2014, at 9:15 AM, Charles Lepple <clepple at gmail.com> wrote:
> On Aug 7, 2014, at 10:52 PM, Charles Lepple <clepple at gmail.com> wrote:
>
>> On Aug 7, 2014, at 10:18 PM, Matthew Stapleton <matthew4196 at gmail.com> wrote:
>>
>>> I just got a Cyberpower SOHO Value 1200 ELCD UPS and even with nut 2.7.2, it appears to report battery voltage
2014 Aug 08
2
Cyberpower Value1200E might not need 0.667 battery scaling
On Aug 7, 2014, at 10:52 PM, Charles Lepple <clepple at gmail.com> wrote:
> On Aug 7, 2014, at 10:18 PM, Matthew Stapleton <matthew4196 at gmail.com> wrote:
>
>> I just got a Cyberpower SOHO Value 1200 ELCD UPS and even with nut 2.7.2, it appears to report battery voltage too low due to the battery scaling function (In drivers/cps-hid.c). Even though the ups has usb id: