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

1991/0427/port/devmnt.c (diff list | history)

1991/0426/sys/src/9/port/devmnt.c:353,3581991/0427/sys/src/9/port/devmnt.c:353,359 (short | long | prev | next)
1990/0227    
	nc->flag = c->flag; 
	nc->offset = c->offset; 
	nc->mnt = c->mnt; 
1991/0427    
	nc->mountid = c->mountid; 
1991/0421    
	nc->aux = c->aux; 
	nc->mntindex = c->mntindex; 
1990/0303    
	nc->mchan = c->mchan; 
1991/0426/sys/src/9/port/devmnt.c:390,4391991/0427/sys/src/9/port/devmnt.c:391,396
1990/0227    
	return found; 
} 
 
1991/0414    
Chan * 
mntclwalk(Chan *c, char *name) 
{ 
	Mnt *m; 
	Mnthdr *mh; 
	Chan *nc; 
                 
	nc = newchan(); 
1991/0425    
	mh = 0; 
	if(waserror()){ 
		close(nc); 
		if(mh) 
			mhfree(mh); 
		return 0; 
	} 
1991/0421    
	m = mntdev(c, 0); 
1991/0414    
	mh = mhalloc(); 
	mh->thdr.type = Tclwalk; 
	mh->thdr.fid = c->fid; 
	mh->thdr.newfid = nc->fid; 
	strcpy(mh->thdr.name, name); 
	mntxmit(m, mh); 
1991/0425    
	if(mh->rhdr.fid == mh->thdr.fid){ 
		/* 
1991/0426    
		 *  hack to indicate the most common error 
1991/0425    
		 */ 
1991/0426    
		errors("directory entry not found"); 
1991/0425    
	} 
1991/0426    
	nc->type = c->type; 
	nc->dev = c->dev; 
	nc->mode = c->mode; 
	nc->flag = c->flag; 
	nc->offset = c->offset; 
	nc->mnt = c->mnt; 
	nc->aux = c->aux; 
	nc->mchan = c->mchan; 
	nc->mqid = c->qid; 
	nc->qid = mh->rhdr.qid; 
	incref(m); 
	poperror(); 
1991/0414    
	mhfree(mh); 
	return nc; 
} 
                 
1990/0227    
void	  
mntstat(Chan *c, char *dp) 
{ 
1991/0426/sys/src/9/port/devmnt.c:784,7901991/0427/sys/src/9/port/devmnt.c:741,747
1990/0604    
		print("type mismatch %d %d\n", mh->rhdr.type, mh->thdr.type+1); 
1990/11211    
		error(Ebadmsg); 
1990/0511    
	} 
1991/0426    
	if(mh->rhdr.fid!=mh->thdr.fid && mh->thdr.type!=Tclwalk){ 
1991/0427    
	if(mh->rhdr.fid != mh->thdr.fid){ 
1990/0604    
		print("fid mismatch %d %d type %d\n", mh->rhdr.fid, mh->thdr.fid, mh->rhdr.type); 
1990/11211    
		error(Ebadmsg); 
1990/0511    
	} 


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