Add support for user-level 9P servers/clients and various bug fixes to go with them.

This commit is contained in:
rsc 2003-12-11 17:48:38 +00:00
parent ac244f8d28
commit 32f69c36e0
60 changed files with 965 additions and 485 deletions

View file

@ -138,6 +138,7 @@ convM2S(uchar *ap, uint nap, Fcall *f)
break;
case Topen:
case Topenfd:
if(p+BIT32SZ+BIT8SZ > ep)
return 0;
f->fid = GBIT32(p);
@ -260,6 +261,7 @@ convM2S(uchar *ap, uint nap, Fcall *f)
break;
case Ropen:
case Ropenfd:
case Rcreate:
p = gqid(p, ep, &f->qid);
if(p == nil)
@ -268,6 +270,12 @@ convM2S(uchar *ap, uint nap, Fcall *f)
return 0;
f->iounit = GBIT32(p);
p += BIT32SZ;
if(f->type == Ropenfd){
if(p+BIT32SZ > ep)
return 0;
f->unixfd = GBIT32(p);
p += BIT32SZ;
}
break;
case Rread: