summaryrefslogtreecommitdiff
path: root/sys/src/cmd/cpu.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-06-16 06:26:31 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2013-06-16 06:26:31 +0200
commite36d9f5c4e667970a4a7aa15744e304ccc7c58f3 (patch)
tree353251f1adcf5cd89a1cc901f7aed099011b8a19 /sys/src/cmd/cpu.c
parentd84aeddee7911c9df739bad58c72189ac336f23f (diff)
make filesystem handling of read9pmsg() consistent
Diffstat (limited to 'sys/src/cmd/cpu.c')
-rw-r--r--sys/src/cmd/cpu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/src/cmd/cpu.c b/sys/src/cmd/cpu.c
index 16d73e814..16c0f6186 100644
--- a/sys/src/cmd/cpu.c
+++ b/sys/src/cmd/cpu.c
@@ -1090,11 +1090,13 @@ notefs(int fd)
ncpunote = 0;
for(;;){
n = read9pmsg(fd, buf, sizeof(buf));
- if(n <= 0){
+ if(n < 0){
if(dbg)
fprint(2, "read9pmsg(%d) returns %d: %r\n", fd, n);
break;
}
+ if(n == 0)
+ continue;
if(convM2S(buf, n, &f) <= BIT16SZ)
break;
if(dbg)