ref: 8a1d10c0885382e63db54b2f38b992b0dbabf035
parent: cd9b242129086acbaf01e6aaecd93b7c5ae0b971
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Sep 28 15:15:10 EDT 2016
nusb/lib: fix wrong endpoint id when openep() finds already existing endpoint file
--- a/sys/src/cmd/nusb/lib/dev.c
+++ b/sys/src/cmd/nusb/lib/dev.c
@@ -54,8 +54,10 @@
if(access(name, AEXIST) == 0){dprint(2, "%s: %s already exists; trying to open\n", argv0, name);
epd = opendev(name);
- if(epd != nil)
+ if(epd != nil){+ epd->id = id;
epd->maxpkt = ep->maxpkt; /* guess */
+ }
return epd;
}
if(devctl(d, "new %d %d %s", id, ep->type, mode) < 0){--
⑨