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

1990/11211/port/devdup.c (diff list | history)

1990/0227/sys/src/9/port/devdup.c:20,261990/11211/sys/src/9/port/devdup.c:20,26 (short | long | prev | next)
1990/0227    
	if((f=u->fd[s]) == 0) 
		return 0; 
	sprint(buf, "%ld", s); 
	devdir(c, s, buf, 0, perm[f->mode&3], dp); 
1990/11211    
	devdir(c, (Qid){s, 0}, buf, 0, perm[f->mode&3], dp); 
1990/0227    
	return 1; 
} 
 
1990/0227/sys/src/9/port/devdup.c:63,781990/11211/sys/src/9/port/devdup.c:63,78
1990/0227    
{ 
	Chan *f; 
 
	if(c->qid == CHDIR){ 
1990/11211    
	if(c->qid.path == CHDIR){ 
1990/0227    
		if(omode != 0) 
			error(0, Eisdir); 
1990/11211    
			error(Eisdir); 
1990/0227    
		c->mode = 0; 
		c->flag |= COPEN; 
		c->offset = 0; 
		return c; 
	} 
	fdtochan(c->qid, openmode(omode));	/* error check only */ 
	f = u->fd[c->qid]; 
1990/11211    
	fdtochan(c->qid.path, openmode(omode));	/* error check only */ 
	f = u->fd[c->qid.path]; 
1990/0227    
	close(c); 
	incref(f); 
	return f; 
1990/0227/sys/src/9/port/devdup.c:81,991990/11211/sys/src/9/port/devdup.c:81,99
1990/0227    
void 
dupcreate(Chan *c, char *name, int omode, ulong perm) 
{ 
	error(0, Eperm); 
1990/11211    
	error(Eperm); 
1990/0227    
} 
 
void 
dupremove(Chan *c) 
{ 
	error(0, Eperm); 
1990/11211    
	error(Eperm); 
1990/0227    
} 
 
void 
dupwstat(Chan *c, char *dp) 
{ 
	error(0, Egreg); 
1990/11211    
	error(Egreg); 
1990/0227    
} 
 
void 
1990/0227/sys/src/9/port/devdup.c:106,1121990/11211/sys/src/9/port/devdup.c:106,112
1990/0227    
{ 
	char *a = va; 
 
	if(c->qid != CHDIR) 
1990/11211    
	if(c->qid.path != CHDIR) 
1990/0227    
		panic("dupread"); 
	return devdirread(c, a, n, (Dirtab *)0, 0L, dupgen); 
} 
1990/0227/sys/src/9/port/devdup.c:115,1301990/11211/sys/src/9/port/devdup.c:115,118
1990/0227    
dupwrite(Chan *c, void *va, long n) 
{ 
	panic("dupwrite"); 
} 
                 
void 
duperrstr(Error *e, char *buf) 
{ 
	rooterrstr(e, buf); 
} 
                 
void 
dupuserstr(Error *e, char *buf) 
{ 
	consuserstr(e, buf); 
} 


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