summaryrefslogtreecommitdiff
path: root/sysutils/usbutil
diff options
context:
space:
mode:
authorjmcneill <jmcneill>2011-07-24 18:00:06 +0000
committerjmcneill <jmcneill>2011-07-24 18:00:06 +0000
commit1a519572580cc5001299526c2dc7dbca095e13f4 (patch)
treef04adb26174d543f9cc5f35ac8b2e1fb56c10e64 /sysutils/usbutil
parent6d317b354651b9373a5edebc3d50cca299be05cb (diff)
downloadpkgsrc-1a519572580cc5001299526c2dc7dbca095e13f4.tar.gz
support HID descriptors larger than 256 bytes
Diffstat (limited to 'sysutils/usbutil')
-rw-r--r--sysutils/usbutil/Makefile4
-rw-r--r--sysutils/usbutil/distinfo4
-rw-r--r--sysutils/usbutil/patches/patch-ab36
3 files changed, 34 insertions, 10 deletions
diff --git a/sysutils/usbutil/Makefile b/sysutils/usbutil/Makefile
index 5d029dded86..c2bf06bbf33 100644
--- a/sysutils/usbutil/Makefile
+++ b/sysutils/usbutil/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.16 2010/12/25 14:03:56 jmcneill Exp $
+# $NetBSD: Makefile,v 1.17 2011/07/24 18:00:06 jmcneill Exp $
#
DISTNAME= usbutil-0.5
-PKGREVISION= 4
+PKGREVISION= 5
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.augustsson.net/pub/netbsd/
diff --git a/sysutils/usbutil/distinfo b/sysutils/usbutil/distinfo
index 9fc286b6cb8..10fd87f91cc 100644
--- a/sysutils/usbutil/distinfo
+++ b/sysutils/usbutil/distinfo
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.13 2010/12/25 14:03:56 jmcneill Exp $
+$NetBSD: distinfo,v 1.14 2011/07/24 18:00:06 jmcneill Exp $
SHA1 (usbutil-0.5.tar.gz) = 4c9abc6f370ab561bd2748b1792802d1e959c599
RMD160 (usbutil-0.5.tar.gz) = 48c6bedeed8daf50a760feedef3575db021066f8
Size (usbutil-0.5.tar.gz) = 11508 bytes
SHA1 (patch-aa) = 8db548f99befd76839b8b31caa2de0861c6d708b
-SHA1 (patch-ab) = 51befb0b885d8b4cf93a1d4da338ea9066846478
+SHA1 (patch-ab) = b470a91102e8ea4fbb592b4a0f5978ed11196969
SHA1 (patch-ac) = 0c1c7e67c84c1a6db1ad0144803977bee7c61ceb
SHA1 (patch-ad) = a98c2a46c6eb860416ff631c62361f5b0282def8
SHA1 (patch-ae) = 92844785b7e6232332a0437cc257b8ecb3f2f50e
diff --git a/sysutils/usbutil/patches/patch-ab b/sysutils/usbutil/patches/patch-ab
index 7c4bfd26663..2767c1b7530 100644
--- a/sysutils/usbutil/patches/patch-ab
+++ b/sysutils/usbutil/patches/patch-ab
@@ -1,7 +1,7 @@
-$NetBSD: patch-ab,v 1.4 2010/12/25 14:03:57 jmcneill Exp $
+$NetBSD: patch-ab,v 1.5 2011/07/24 18:00:07 jmcneill Exp $
---- usbctl.c.orig 2002-02-25 00:50:55.000000000 +0000
-+++ usbctl.c
+--- usbctl.c.orig 2002-02-24 19:50:55.000000000 -0500
++++ usbctl.c 2011-07-24 09:56:59.000000000 -0400
@@ -27,12 +27,18 @@
#include <stdio.h>
#include <stdlib.h>
@@ -156,7 +156,31 @@ $NetBSD: patch-ab,v 1.4 2010/12/25 14:03:57 jmcneill Exp $
case UDESC_CS_DEVICE:
if (*class == UICLASS_HID) {
usb_hid_descriptor_t *hid = p;
-@@ -1243,8 +1312,8 @@ prdesc(void *p, int *class, int *subclas
+@@ -1155,10 +1224,14 @@ prdesc(void *p, int *class, int *subclas
+ printf("\n");
+ for(k = 0; k < hid->bNumDescriptors; k++) {
+ int type, len;
+- u_char buf[256];
++ u_char *buf;
+
+ type = hid->descrs[k].bDescriptorType;
+ len = UGETW(hid->descrs[k].wDescriptorLength);
++ buf = malloc(len);
++ if (buf == NULL) {
++ errx(1, "malloc failed (size=%d)\n", len);
++ }
+ if (type == UDESC_REPORT) {
+ getreportdesc(globf, *iface, k, buf, len, globaddr);
+ printf("Report descriptor\n");
+@@ -1169,6 +1242,7 @@ prdesc(void *p, int *class, int *subclas
+ printf("Unknown HID descriptor type %d\n", type);
+ }
+ printf("\n");
++ free(buf);
+ }
+ } else
+ goto def;
+@@ -1243,8 +1317,8 @@ prdesc(void *p, int *class, int *subclas
default:
def:
printf("Unknown descriptor (class %d/%d):\n", *class, *subclass);
@@ -167,7 +191,7 @@ $NetBSD: patch-ab,v 1.4 2010/12/25 14:03:57 jmcneill Exp $
);
break;
}
-@@ -1321,6 +1390,7 @@ main(int argc, char **argv)
+@@ -1321,6 +1395,7 @@ main(int argc, char **argv)
if (!doaddr)
prunits(f);
@@ -175,7 +199,7 @@ $NetBSD: patch-ab,v 1.4 2010/12/25 14:03:57 jmcneill Exp $
if (!nodisc) {
r = ioctl(f, USB_DISCOVER);
if (r < 0)
-@@ -1329,6 +1399,7 @@ main(int argc, char **argv)
+@@ -1329,6 +1404,7 @@ main(int argc, char **argv)
if (disconly)
exit(0);
}