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

1997/0327/port/dev.c (diff list | history)

1996/0223/sys/src/9/port/dev.c:59,651997/0327/sys/src/9/port/dev.c:59,75 (short | long | prev | next)
Add devreset, devinit, devcreate. Format edits. Devtab is now an array of pointers not structures.
rsc Fri Mar 4 12:44:25 2005
1990/0227    
	return 1; 
} 
 
Chan * 
1997/0327    
void 
devreset(void) 
{ 
} 
 
void 
devinit(void) 
{ 
} 
 
Chan* 
1990/0227    
devattach(int tc, char *spec) 
{ 
	Chan *c; 
1996/0223/sys/src/9/port/dev.c:75,811997/0327/sys/src/9/port/dev.c:85,91
1990/0227    
	return c; 
} 
 
Chan * 
1997/0327    
Chan* 
1990/0227    
devclone(Chan *c, Chan *nc) 
{ 
1990/0329    
	if(c->flag & COPEN) 
1996/0223/sys/src/9/port/dev.c:129,1351997/0327/sys/src/9/port/dev.c:139,145
1990/0227    
			continue; 
		} 
1993/0501    
	} 
	return 0;	/* not reached */ 
1997/0327    
	return 0; 
1991/0411    
} 
 
1990/0227    
void 
1996/0223/sys/src/9/port/dev.c:146,1531997/0327/sys/src/9/port/dev.c:156,165
1990/0227    
				convD2M(&dir, db); 
				return; 
			} 
1993/0501    
			print("%s %s: devstat %C %lux\n", up->text, up->user, 
						devchar[c->type], c->qid.path); 
1997/0327    
			print("%s %s: devstat %C %lux\n", 
				up->text, up->user, 
				devchar[c->type], c->qid.path); 
 
1991/0626    
			error(Enonexist); 
1993/0330    
		case 0: 
			break; 
1996/0223/sys/src/9/port/dev.c:189,1951997/0327/sys/src/9/port/dev.c:201,207
1990/0821    
	return m; 
1990/0227    
} 
 
Chan * 
1997/0327    
Chan* 
1990/0227    
devopen(Chan *c, int omode, Dirtab *tab, int ntab, Devgen *gen) 
{ 
	int i; 
1996/0223/sys/src/9/port/dev.c:230,2351997/0327/sys/src/9/port/dev.c:242,253
1990/0227    
	return c; 
} 
1995/0108    
 
1997/0327    
void	  
devcreate(Chan*, char*, int, ulong) 
{ 
	error(Eperm); 
} 
 
1995/0108    
Block* 
devbread(Chan *c, long n, ulong offset) 
{ 
1996/0223/sys/src/9/port/dev.c:242,2481997/0327/sys/src/9/port/dev.c:260,266
1995/0108    
		freeb(bp); 
		nexterror(); 
	} 
	bp->wp += devtab[c->type].read(c, bp->wp, n, offset); 
1997/0327    
	bp->wp += devtab[c->type]->read(c, bp->wp, n, offset); 
1995/0108    
	poperror(); 
	return bp; 
} 
1996/0223/sys/src/9/port/dev.c:252,2601997/0327/sys/src/9/port/dev.c:270,289
1995/0108    
{ 
	long n; 
 
	n = devtab[c->type].write(c, bp->rp, BLEN(bp), offset); 
1997/0327    
	n = devtab[c->type]->write(c, bp->rp, BLEN(bp), offset); 
1995/0108    
	freeb(bp); 
 
	return n;	 
} 
 
1997/0327    
void 
devremove(Chan*) 
{ 
	error(Eperm); 
} 
 
void 
devwstat(Chan*, char*) 
{ 
	error(Eperm); 
} 


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