9P2000.u fixes (Lucho Ionkov)

This commit is contained in:
rsc 2005-11-21 20:42:52 +00:00
parent 86c2ab2caf
commit 9e2f1d9bf4
4 changed files with 23 additions and 9 deletions

View file

@ -124,7 +124,7 @@ fcallfmt(Fmt *fmt)
break;
case Rstat:
p = seprint(buf, e, "Rstat tag %ud ", tag);
if(f->nstat > sizeof tmp)
if(f->stat == nil || f->nstat > sizeof tmp)
seprint(p, e, " stat(%d bytes)", f->nstat);
else{
d = (Dir*)tmp;
@ -135,7 +135,7 @@ fcallfmt(Fmt *fmt)
break;
case Twstat: /* 126 */
p = seprint(buf, e, "Twstat tag %ud fid %ud", tag, fid);
if(f->nstat > sizeof tmp)
if(f->stat == nil || f->nstat > sizeof tmp)
seprint(p, e, " stat(%d bytes)", f->nstat);
else{
d = (Dir*)tmp;