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/vnc/exportfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/src/cmd/vnc/exportfs.c') diff --git a/sys/src/cmd/vnc/exportfs.c b/sys/src/cmd/vnc/exportfs.c index a2feb83ae..07e20e477 100644 --- a/sys/src/cmd/vnc/exportfs.c +++ b/sys/src/cmd/vnc/exportfs.c @@ -149,8 +149,9 @@ exportproc(Export *fs) errdepth(ed); q = smalloc(sizeof(Exq)); - n = read9pmsg(fs->io, q->buf, Maxrpc); - if(n <= 0 || convM2S(q->buf, n, &q->rpc) != n) + while((n = read9pmsg(fs->io, q->buf, Maxrpc)) == 0) + ; + if(n < 0 || convM2S(q->buf, n, &q->rpc) != n) goto bad; if(exdebug) -- cgit v1.2.3