summaryrefslogtreecommitdiff
path: root/sys/src/cmd/ip
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/ip
parentd84aeddee7911c9df739bad58c72189ac336f23f (diff)
make filesystem handling of read9pmsg() consistent
Diffstat (limited to 'sys/src/cmd/ip')
-rw-r--r--sys/src/cmd/ip/ftpfs/ftpfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/src/cmd/ip/ftpfs/ftpfs.c b/sys/src/cmd/ip/ftpfs/ftpfs.c
index 5d6f35b2e..540ce853b 100644
--- a/sys/src/cmd/ip/ftpfs/ftpfs.c
+++ b/sys/src/cmd/ip/ftpfs/ftpfs.c
@@ -262,12 +262,14 @@ io(void)
while(!dying){
n = read9pmsg(mfd, mdata, messagesize);
- if(n <= 0){
+ if(n < 0){
errstr(buf, sizeof buf);
if(buf[0]=='\0' || strstr(buf, "hungup"))
exits("");
fatal("mount read: %s\n", buf);
}
+ if(n == 0)
+ continue;
if(convM2S(mdata, n, &thdr) == 0)
continue;