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

1999/0901/ip/devip.c (diff list | history)

1999/0817/sys/src/9/ip/devip.c:609,6171999/0901/sys/src/9/ip/devip.c:609,629 (short | long | prev | next)
1997/0327    
} 
 
static Block* 
ipbread(Chan* c, long n, ulong offset) 
1999/0901    
ipbread(Chan* ch, long n, ulong offset) 
1997/0327    
{ 
	return devbread(c, n, offset); 
1999/0901    
	Conv *c; 
	Proto *x; 
	Fs *f; 
 
	switch(TYPE(ch->qid)){ 
	case Qdata: 
		f = ipfs[ch->dev]; 
		x = f->p[PROTO(ch->qid)]; 
		c = x->conv[CONV(ch->qid)]; 
		return qbread(c->rq, n); 
	default: 
		return devbread(ch, n, offset); 
	} 
1997/0327    
} 
 
1998/0306    
/* 
1999/0817/sys/src/9/ip/devip.c:964,9721999/0901/sys/src/9/ip/devip.c:976,1006
1997/0327    
} 
 
static long 
ipbwrite(Chan* c, Block* bp, ulong offset) 
1999/0901    
ipbwrite(Chan* ch, Block* bp, ulong offset) 
1997/0327    
{ 
	return devbwrite(c, bp, offset); 
1999/0901    
	Conv *c; 
	Proto *x; 
	Fs *f; 
	int n; 
 
	switch(TYPE(ch->qid)){ 
	case Qdata: 
		f = ipfs[ch->dev]; 
		x = f->p[PROTO(ch->qid)]; 
		c = x->conv[CONV(ch->qid)]; 
 
		if(c->wq == nil) 
			error(Eperm); 
 
		if(bp->next) 
			bp = concatblock(bp); 
		n = BLEN(bp); 
		qbwrite(c->wq, bp); 
		x->kick(c, n); 
		return n; 
	default: 
		return devbwrite(ch, bp, offset); 
	} 
1997/0327    
} 
 
Dev ipdevtab = { 


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