~kris/9p

9hist

ed8dccd5f3d0221177b210ac427860ae72283271 — David du Colombier 27 years ago c31dff6
Plan 9 from Bell Labs 1999-07-22
1 files changed, 7 insertions(+), 2 deletions(-)

M port/devmnt.c
M port/devmnt.c => port/devmnt.c +7 -2
@@ 36,7 36,6 @@ struct Mntalloc
}mntalloc;

#define MAXRPC		(16*1024+MAXMSG)
#define limit(n, max)	(n > max ? max : n)

void	mattach(Mnt*, Chan*, char*);
void	mntauth(Mnt*, Mntrpc*, char*, ushort);


@@ 584,7 583,13 @@ mntrdwr(int type, Chan *c, void *buf, long n, vlong off)
		r->request.fid = c->fid;
		r->request.offset = off;
		r->request.data = uba;
		r->request.count = limit(n, m->blocksize);
		if(n > m->blocksize){
			if(c->qid.path & CHDIR)
				r->request.count = (m->blocksize/DIRLEN)*DIRLEN;
			else
				r->request.count = m->blocksize;
		} else
			r->request.count = n;
		mountrpc(m, r);
		nreq = r->request.count;
		nr = r->reply.count;