On Tue, Aug 23, 2022 at 09:01:08AM -0600, Theo de Raadt wrote: > Jonathan Gray <[email protected]> wrote: > > > Index: usbdevs > > =================================================================== > > RCS file: /cvs/src/sys/dev/usb/usbdevs,v > > retrieving revision 1.747 > > diff -u -p -r1.747 usbdevs > > --- usbdevs 23 Jun 2022 00:31:37 -0000 1.747 > > +++ usbdevs 23 Aug 2022 14:39:28 -0000 > > @@ -2432,6 +2432,7 @@ product INTEL2 RMH_8 0x800a Rate Matchi > > product INTERBIO IOBOARD 0x1002 IO Board > > product INTERBIO MINIIOBOARD 0x1003 Mini IO Board > > product INTERBIO MINIIOBOARD2 0x1006 Mini IO Board > > +product INTERBIO DAPPERMISER 0x2488 > > > > /* Intersil products */ > > product INTERSIL PRISM_GT 0x1000 PrismGT USB 2.0 WLAN > > > > results in a usbdevs_data.h entry of > > > > { > > USB_VENDOR_INTERBIO, USB_PRODUCT_INTERBIO_DAPPERMISER, > > "", > > }, > > > > reading usb_subr.c usbd_cache_devinfo() that should work > > > > though if the device doesn't provide a string and we don't either > > we will print "" instead of "product 0x0x2488" > > > > OK, so "" is being handled the way I think we want. > > > For some devices like that, should we put the text description in /* .. */ or > add support for // comments, so that we can remove it from the binary? > > I wonder if the "" strings are being merged by the assembler/linker.
'#' results in the same usbdevs_data.h output and usbdevs.h then has #define USB_PRODUCT_INTERBIO_DAPPERMISER 0x2488 /* (CMSIS-DAP) */ trying to use /* CMSIS-DAP */ gives #define USB_PRODUCT_INTERBIO_DAPPERMISER 0x2488 /* /* CMSIS-DAP */ */ Index: usbdevs =================================================================== RCS file: /cvs/src/sys/dev/usb/usbdevs,v retrieving revision 1.747 diff -u -p -r1.747 usbdevs --- usbdevs 23 Jun 2022 00:31:37 -0000 1.747 +++ usbdevs 23 Aug 2022 15:05:40 -0000 @@ -2432,6 +2432,7 @@ product INTEL2 RMH_8 0x800a Rate Matchi product INTERBIO IOBOARD 0x1002 IO Board product INTERBIO MINIIOBOARD 0x1003 Mini IO Board product INTERBIO MINIIOBOARD2 0x1006 Mini IO Board +product INTERBIO DAPPERMISER 0x2488 # CMSIS-DAP /* Intersil products */ product INTERSIL PRISM_GT 0x1000 PrismGT USB 2.0 WLAN
