this makes usbctl (from usbutil) more user friendly (no more need to read source to find the sooper sekrit option that makes it do something useful with the default command-line) and fixes a few bugs.
- #ifdef out the USB_DISCOVER call, makes the port work without the undocumented -n option - don't assume that usb_descriptor_t has a field bDescriptorSubtype, this field is class specific and shouldn't be there - make fetch of hub descriptors in usbctl work (by setting the correct request value) - before reading a string descriptor, read the language table and use a correct language code if possible - install usbgen(8) manual, regen plist, bump patches are mostly from pkgsrc: http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/sysutils/usbutil/patches/patch-ab any comments/ok? Index: Makefile =================================================================== RCS file: /cvs/ports/sysutils/usbutil/Makefile,v retrieving revision 1.15 diff -u -p -r1.15 Makefile --- Makefile 15 Sep 2007 21:14:03 -0000 1.15 +++ Makefile 15 Dec 2008 17:35:42 -0000 @@ -3,6 +3,7 @@ COMMENT= USB developer utilities DISTNAME= usbutil-0.5 +PKGNAME= ${DISTNAME}p0 CATEGORIES= sysutils MASTER_SITES= ftp://ftp.augustsson.net/pub/netbsd/ @@ -14,5 +15,10 @@ PERMIT_DISTFILES_FTP= Yes WANTLIB= c NO_REGRESS= Yes + +INSTALL_TARGET= man install + +post-install: + ${INSTALL_MAN} ${WRKSRC}/usbgen.0 ${PREFIX}/man/cat8 .include <bsd.port.mk> Index: patches/patch-usbctl_c =================================================================== RCS file: patches/patch-usbctl_c diff -N patches/patch-usbctl_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-usbctl_c 15 Dec 2008 17:35:42 -0000 @@ -0,0 +1,36 @@ +$OpenBSD$ +--- usbctl.c.orig Mon Feb 25 00:50:55 2002 ++++ usbctl.c Mon Dec 15 17:34:51 2008 +@@ -62,6 +62,7 @@ + #endif + + #define NSTRINGS ++#define STRINGLANG + + int num = 0; + +@@ -384,7 +385,7 @@ struct usb_cdc_union_descriptor { + }; + + void +-prcdcd(usb_descriptor_t *ud) ++prcdcd(struct usb_cdc_header_descriptor *ud) + { + if (ud->bDescriptorType != UDESC_CS_INTERFACE) + printf("prcdcd: strange bDescriptorType=%d\n", +@@ -1321,6 +1322,7 @@ main(int argc, char **argv) + + if (!doaddr) + prunits(f); ++#ifndef __OpenBSD__ + if (!nodisc) { + r = ioctl(f, USB_DISCOVER); + if (r < 0) +@@ -1329,6 +1331,7 @@ main(int argc, char **argv) + if (disconly) + exit(0); + } ++#endif + + for(addr = 0; addr < USB_MAX_DEVICES; addr++) { + if (doaddr != -1 && addr != doaddr) Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/sysutils/usbutil/pkg/PLIST,v retrieving revision 1.2 diff -u -p -r1.2 PLIST --- pkg/PLIST 20 Jun 2000 19:32:44 -0000 1.2 +++ pkg/PLIST 15 Dec 2008 17:35:42 -0000 @@ -1,5 +1,6 @@ @comment $OpenBSD: PLIST,v 1.2 2000/06/20 19:32:44 jakob Exp $ -sbin/usbctl -sbin/usbdebug -sbin/usbgen -sbin/usbstats +...@man man/cat8/usbgen.0 +...@bin sbin/usbctl +...@bin sbin/usbdebug +...@bin sbin/usbgen +...@bin sbin/usbstats
