summaryrefslogtreecommitdiff
path: root/devel/libusb/patches/patch-ab
diff options
context:
space:
mode:
Diffstat (limited to 'devel/libusb/patches/patch-ab')
-rw-r--r--devel/libusb/patches/patch-ab47
1 files changed, 47 insertions, 0 deletions
diff --git a/devel/libusb/patches/patch-ab b/devel/libusb/patches/patch-ab
new file mode 100644
index 00000000000..bd063e02548
--- /dev/null
+++ b/devel/libusb/patches/patch-ab
@@ -0,0 +1,47 @@
+$NetBSD: patch-ab,v 1.1.1.1 2001/03/28 10:11:41 drochner Exp $
+
+--- freebsd.c.orig Fri Feb 16 17:59:02 2001
++++ freebsd.c Fri Feb 16 17:59:16 2001
+@@ -41,16 +41,18 @@
+ {
+ int i;
+ struct freebsd_usb_dev_handle_info *info;
++ char ctlpath[PATH_MAX];
+
+ info = malloc(sizeof(*info));
+ if (!info)
+ USB_ERROR(-ENOMEM);
+ dev->impl_info = info;
+
+- dev->fd = open(dev->device->filename, O_RDWR);
++ snprintf(ctlpath, PATH_MAX, "%s.00", dev->device->filename);
++ dev->fd = open(ctlpath, O_RDWR);
+ if (dev->fd < 0)
+ {
+- dev->fd = open(dev->device->filename, O_RDONLY);
++ dev->fd = open(ctlpath, O_RDONLY);
+ if (dev->fd < 0)
+ {
+ free(info);
+@@ -152,7 +154,7 @@
+
+ if(info->ep_fd[ep] < 0)
+ {
+- sprintf(buf, "%s.%d", dev->device->filename, ep);
++ sprintf(buf, "%s.%02d", dev->device->filename, ep);
+ fd = open(buf, O_RDONLY);
+ if(fd < 0)
+ USB_ERROR_STR(fd, "can't open %s for bulk read: %s\n",
+@@ -234,10 +236,12 @@
+ req.data = bytes;
+ req.flags = 0;
+
++#if 0
+ ret = ioctl(dev->fd, USB_SET_TIMEOUT, &timeout);
+ if (ret < 0)
+ USB_ERROR_STR(ret, "error setting timeout: %s",
+ strerror(errno));
++#endif
+
+ ret = ioctl(dev->fd, USB_DO_REQUEST, &req);
+ if (ret < 0)