summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/src/cmd/nusb/lib/dev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/src/cmd/nusb/lib/dev.c b/sys/src/cmd/nusb/lib/dev.c
index 2eed9490e..c556bcfa6 100644
--- a/sys/src/cmd/nusb/lib/dev.c
+++ b/sys/src/cmd/nusb/lib/dev.c
@@ -54,8 +54,10 @@ openep(Dev *d, int id)
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){