plan 9 kernel history: overview | file list | diff list

1993/1014/port/devmnt.c (diff list | history)

1993/1011/sys/src/9/port/devmnt.c:44,501993/1014/sys/src/9/port/devmnt.c:44,50 (short | long | prev | next)
1992/0320    
void	mntpntfree(Mnt*); 
1992/0825    
void	mntqrm(Mnt*, Mntrpc*); 
1993/0501    
Mntrpc*	mntralloc(Chan*); 
1992/0825    
long	mntrdwr(int , Chan*, void*,long , ulong); 
1993/1014    
long	mntrdwr(int , Mnt*, Chan*, void*,long , ulong); 
1992/0825    
void	mntrpcread(Mnt*, Mntrpc*); 
void	mountio(Mnt*, Mntrpc*); 
void	mountmux(Mnt*, Mntrpc*); 
1993/1011/sys/src/9/port/devmnt.c:83,891993/1014/sys/src/9/port/devmnt.c:83,89
1990/0227    
	struct bogus{ 
		Chan	*chan; 
		char	*spec; 
1993/0501    
		char	recov; 
1993/1014    
		int	flag; 
1990/0227    
	}bogus; 
 
1991/0911    
	bogus = *((struct bogus *)muxattach); 
1993/1011/sys/src/9/port/devmnt.c:133,1391993/1014/sys/src/9/port/devmnt.c:133,139
1992/0620    
	m->c = c; 
1991/1011    
	m->c->flag |= CMSG; 
1993/0501    
	m->blocksize = MAXFDATA;	/**/ 
	m->recov = bogus.recov; 
1993/1014    
	m->flags = bogus.flags; 
1991/0911    
 
	switch(devchar[m->c->type]) { 
	default: 
1993/1011/sys/src/9/port/devmnt.c:302,3141993/1014/sys/src/9/port/devmnt.c:302,307
1993/0501    
	op = c->path; 
	c->path = ptenter(&m->tree, op, name); 
1993/0808    
 
/* ASSERT do not remove */ 
1993/0501    
if(op->ref == 0) { 
	char buf[128]; 
	ptpath(op, buf, sizeof(buf)); 
	print("PATH: '%s' walking %s\n", op, name); 
} 
1993/0808    
                 
1993/0501    
	decref(op); 
1991/0911    
 
1990/0227    
	poperror(); 
1993/1011/sys/src/9/port/devmnt.c:488,5001993/1014/sys/src/9/port/devmnt.c:481,509
1990/0227    
long	  
1991/0411    
mntread(Chan *c, void *buf, long n, ulong offset) 
1990/0227    
{ 
1993/1014    
	int nc; 
1991/0911    
	uchar *p, *e; 
1990/0227    
 
1991/0911    
	n = mntrdwr(Tread, c, buf, n, offset); 
1993/1014    
	m = mntchk(c); 
	nc = 0; 
	if((m->flags&MCACHE) && !isdir(c)) { 
		nc = cread(c, buf, n, offset); 
		if(nc == n) 
			return n; 
 
		buf = (uchar*)buf+nc; 
		offset += nc; 
		n -= nc; 
	} 
 
	n = mntrdwr(Tread, m, c, buf, n, offset); 
1991/0911    
	if(c->qid.path & CHDIR)  
		for(p = (uchar*)buf, e = &p[n]; p < e; p += DIRLEN) 
			mntdirfix(p, c); 
 
1993/1014    
	if(nc != 0) 
		cupdate(c, buf, n, offset); 
 
1990/0227    
	return n; 
} 
 
1993/1011/sys/src/9/port/devmnt.c:501,5181993/1014/sys/src/9/port/devmnt.c:510,526
1990/0227    
long	  
1991/0411    
mntwrite(Chan *c, void *buf, long n, ulong offset) 
1990/0227    
{ 
1991/0911    
	return mntrdwr(Twrite, c, buf, n, offset);	 
1993/1014    
	m = mntchk(c); 
	return mntrdwr(Twrite, m, c, buf, n, offset);	 
1990/0227    
} 
 
1991/0911    
long 
mntrdwr(int type, Chan *c, void *buf, long n, ulong offset) 
1993/1014    
mntrdwr(int type, Mnt *m, Chan *c, void *buf, long n, ulong offset) 
1990/0227    
{ 
	Mnt *m; 
1991/0911    
	Mntrpc *r; 
	char *uba; 
1992/0825    
	ulong cnt, nr; 
1990/0227    
 
1991/0911    
	m = mntchk(c); 
	uba = buf; 
1993/0907    
	cnt = 0; 
	for(;;) { 
1993/1011/sys/src/9/port/devmnt.c:553,5591993/1014/sys/src/9/port/devmnt.c:561,567
1992/0613    
	r->reply.type = 4; 
1992/0620    
 
1993/0501    
	while(waserror()) { 
		if(m->recov == 0) 
1993/1014    
		if((m->flags & MRECOV) == 0) 
1993/0501    
			nexterror(); 
		mntrecover(m, r); 
	} 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)