56ed87fff3
in the direction of permissions on the device nodes, this is a fairly common problem when configuring NUT with a USB UPS.
23 lines
894 B
Plaintext
23 lines
894 B
Plaintext
$OpenBSD: patch-drivers_usbhid-ups_c,v 1.3 2011/07/19 21:06:09 sthen Exp $
|
|
--- drivers/usbhid-ups.c.orig Tue May 31 11:36:49 2011
|
|
+++ drivers/usbhid-ups.c Tue Jul 19 21:53:33 2011
|
|
@@ -908,7 +908,7 @@ void upsdrv_initups(void)
|
|
regular expression (USB) or device_path (SHUT) */
|
|
ret = comm_driver->open(&udev, &curDevice, subdriver_matcher, &callback);
|
|
if (ret < 1)
|
|
- fatalx(EXIT_FAILURE, "No matching HID UPS found");
|
|
+ fatalx(EXIT_FAILURE, "No matching HID UPS found - check permissions on /dev/ugen* and /dev/usb*");
|
|
|
|
hd = &curDevice;
|
|
|
|
@@ -1228,7 +1228,9 @@ static bool_t hid_ups_walk(walkmode_t mode)
|
|
|
|
case -ETIMEDOUT: /* Connection timed out */
|
|
case -EOVERFLOW: /* Value too large for defined data type */
|
|
+#ifdef EPROTO
|
|
case -EPROTO: /* Protocol error */
|
|
+#endif
|
|
case -EPIPE: /* Broken pipe */
|
|
default:
|
|
/* Don't know what happened, try again later... */
|