ref: 76ee4c3988f4f4e89514c203d8b7781abd29f24a
parent: c8c65f183d578690e0c14588f01f96115e2d5cdb
author: cinap_lenrek <[email protected]>
date: Sun May 17 21:26:29 EDT 2015
usbd: set device info for control file (see usb(3), thanks qeed)
--- a/sys/src/cmd/nusb/usbd/usbd.c
+++ b/sys/src/cmd/nusb/usbd/usbd.c
@@ -393,7 +393,12 @@
/* assign stable name based on device descriptor */
assignhname(d);
-
+
+ /* set device info for ctl file */
+ devctl(d, "info %s csp %#08lux vid %#.4ux did %#.4ux %q %q %s",
+ classname(Class(d->usb->csp)), d->usb->csp, d->usb->vid, d->usb->did,
+ d->usb->vendor, d->usb->product, d->hname);
+
pushevent(d, formatdev(d, 0));
return 0;
}