From e36d9f5c4e667970a4a7aa15744e304ccc7c58f3 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 16 Jun 2013 06:26:31 +0200 Subject: make filesystem handling of read9pmsg() consistent --- sys/src/cmd/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/src/cmd/cpu.c') 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) -- cgit v1.2.3