ref: f465701b82fe7fda5542db3ec7d60521e6f8099d
parent: 195f903983c50680bd10fda9d6c5532bbe3fa4ad
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Sun Sep 15 12:21:43 EDT 2013
nusb/serial: set exit status
--- a/sys/src/cmd/nusb/serial/serial.c
+++ b/sys/src/cmd/nusb/serial/serial.c
@@ -879,8 +879,11 @@
}
qunlock(ser);
- if(nports > 0){- snprint(buf, sizeof buf, "%d.serial", dev->id);
- threadpostsharesrv(&serialfs, nil, "usb", buf);
- }
+
+ if(nports == 0)
+ threadexits("no ports");+
+ snprint(buf, sizeof buf, "%d.serial", dev->id);
+ threadpostsharesrv(&serialfs, nil, "usb", buf);
+ threadexits(0);
}
--
⑨