diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-06-16 06:26:31 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-06-16 06:26:31 +0200 |
commit | e36d9f5c4e667970a4a7aa15744e304ccc7c58f3 (patch) | |
tree | 353251f1adcf5cd89a1cc901f7aed099011b8a19 /sys/src/cmd/plumb/fsys.c | |
parent | d84aeddee7911c9df739bad58c72189ac336f23f (diff) |
make filesystem handling of read9pmsg() consistent
Diffstat (limited to 'sys/src/cmd/plumb/fsys.c')
-rw-r--r-- | sys/src/cmd/plumb/fsys.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/src/cmd/plumb/fsys.c b/sys/src/cmd/plumb/fsys.c index ffedce259..0a5f6fbdd 100644 --- a/sys/src/cmd/plumb/fsys.c +++ b/sys/src/cmd/plumb/fsys.c @@ -237,12 +237,10 @@ fsysproc(void*) if(buf == nil) error("malloc failed: %r"); qlock(&readlock); - n = read9pmsg(srvfd, buf, messagesize); - if(n <= 0){ - if(n < 0) - error("i/o error on server channel"); + while((n = read9pmsg(srvfd, buf, messagesize)) == 0) + ; + if(n < 0) threadexitsall("unmounted"); - } if(readlock.head == nil) /* no other processes waiting to read; start one */ proccreate(fsysproc, nil, Stack); qunlock(&readlock); |