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

1990/11211/gnot/devincon.c (diff list | history)

1990/11151/sys/src/9/gnot/devincon.c:151,1571990/11211/sys/src/9/gnot/devincon.c:151,157 (short | long | prev | next)
1990/0312    
	Device *dev; 
 
1990/0315    
	if (cnt<1 || cnt>14 || del<1 || del>15) 
1990/0312    
		error(0, Ebadarg); 
1990/11211    
		error(Ebadarg); 
1990/0312    
 
	dev = ip->dev; 
	dev->cmd = sel_rcv_cnt | INCON_RUN; 
1990/11151/sys/src/9/gnot/devincon.c:181,1921990/11211/sys/src/9/gnot/devincon.c:181,192
1990/1101    
	switch(n){ 
	default: 
		freeb(bp); 
		error(0, Ebadarg); 
1990/11211    
		error(Ebadarg); 
1990/1101    
	case 2: 
		del = strtol(field[1], 0, 0); 
		if(del<0 || del>15){ 
			freeb(bp); 
			error(0, Ebadarg); 
1990/11211    
			error(Ebadarg); 
1990/1101    
		} 
		/* fall through */ 
	case 1: 
1990/11151/sys/src/9/gnot/devincon.c:193,1991990/11211/sys/src/9/gnot/devincon.c:193,199
1990/1101    
		cnt = strtol(field[0], 0, 0); 
		if(cnt<0 || cnt>15){ 
			freeb(bp); 
			error(0, Ebadarg); 
1990/11211    
			error(Ebadarg); 
1990/1101    
		} 
	} 
	inconset(ip, cnt, del); 
1990/11151/sys/src/9/gnot/devincon.c:336,3421990/11211/sys/src/9/gnot/devincon.c:336,342
1990/0312    
 
	i = strtoul(spec, 0, 0); 
	if(i >= Nincon) 
		error(0, Ebadarg); 
1990/11211    
		error(Ebadarg); 
1990/0312    
	ip = &incon[i]; 
	if(ip->state != Selected) 
		inconrestart(ip); 
1990/11151/sys/src/9/gnot/devincon.c:343,3491990/11211/sys/src/9/gnot/devincon.c:343,350
1990/0312    
 
	c = devattach('i', spec); 
	c->dev = i; 
	c->qid = CHDIR; 
1990/11211    
	c->qid.path = CHDIR; 
	c->qid.vers = 0; 
1990/0312    
	return c; 
} 
 
1990/11151/sys/src/9/gnot/devincon.c:368,3761990/11211/sys/src/9/gnot/devincon.c:369,377
1990/0312    
Chan* 
inconopen(Chan *c, int omode) 
{ 
	if(c->qid == CHDIR){ 
1990/11211    
	if(c->qid.path == CHDIR){ 
1990/0312    
		if(omode != OREAD) 
			error(0, Eperm); 
1990/11211    
			error(Eperm); 
1990/0312    
	}else 
		streamopen(c, &inconinfo); 
	c->mode = openmode(omode); 
1990/11151/sys/src/9/gnot/devincon.c:382,3941990/11211/sys/src/9/gnot/devincon.c:383,395
1990/0312    
void	  
inconcreate(Chan *c, char *name, int omode, ulong perm) 
{ 
	error(0, Eperm); 
1990/11211    
	error(Eperm); 
1990/0312    
} 
 
void	  
inconclose(Chan *c) 
{ 
	if(c->qid != CHDIR) 
1990/11211    
	if(c->qid.path != CHDIR) 
1990/0312    
		streamclose(c); 
} 
 
1990/11151/sys/src/9/gnot/devincon.c:407,4311990/11211/sys/src/9/gnot/devincon.c:408,420
1990/0312    
void	  
inconremove(Chan *c) 
{ 
	error(0, Eperm); 
1990/11211    
	error(Eperm); 
1990/0312    
} 
 
void	  
inconwstat(Chan *c, char *dp) 
{ 
	error(0, Eperm); 
} 
                 
void 
inconuserstr(Error *e, char *buf) 
{ 
	consuserstr(e, buf); 
} 
                 
void	  
inconerrstr(Error *e, char *buf) 
{ 
	rooterrstr(e, buf); 
1990/11211    
	error(Eperm); 
1990/0312    
} 
 
/* 


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