From d84aeddee7911c9df739bad58c72189ac336f23f Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 16 Jun 2013 06:16:43 +0200 Subject: devmnt: add debug print for convS2M failing, suspecting this causing zero length writes --- sys/src/9/port/devmnt.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sys/src') diff --git a/sys/src/9/port/devmnt.c b/sys/src/9/port/devmnt.c index da51d0366..926b6ee61 100644 --- a/sys/src/9/port/devmnt.c +++ b/sys/src/9/port/devmnt.c @@ -794,8 +794,12 @@ mountio(Mnt *m, Mntrpc *r) if(m->msize == 0) panic("msize"); n = convS2M(&r->request, r->rpc, m->msize); - if(n < 0) - panic("bad message type in mountio"); + if(n <= 0){ + print("mountio: proc %s %lud: convS2M returned %d for tag %d fid %d T%d\n", + up->text, up->pid, n, r->request.tag, r->request.fid, r->request.type); + error(Emountrpc); + } + if(devtab[m->c->type]->write(m->c, r->rpc, n, 0) != n) error(Emountrpc); r->stime = fastticks(nil); -- cgit v1.2.3