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

1993/0907/port/devmnt.c (diff list | history)

1993/0808/sys/src/9/port/devmnt.c:516,5221993/0907/sys/src/9/port/devmnt.c:516,523 (short | long | prev | next)
1990/0227    
 
1991/0911    
	m = mntchk(c); 
	uba = buf; 
1993/0501    
	for(cnt = 0; n; n -= nr) { 
1993/0907    
	cnt = 0; 
	for(;;) { 
1993/0501    
		r = mntralloc(c); 
1991/0911    
		if(waserror()) { 
			mntfree(r); 
1993/0808/sys/src/9/port/devmnt.c:529,5341993/0907/sys/src/9/port/devmnt.c:530,537
1991/0926    
		r->request.count = limit(n, m->blocksize); 
1991/0911    
		mountrpc(m, r); 
		nr = r->reply.count; 
1993/0907    
		if(nr > r->request.count) 
			nr = r->request.count; 
1991/0911    
		if(type == Tread) 
			memmove(uba, r->reply.data, nr); 
		poperror(); 
1993/0808/sys/src/9/port/devmnt.c:536,5421993/0907/sys/src/9/port/devmnt.c:539,546
1991/0911    
		offset += nr; 
		uba += nr; 
		cnt += nr; 
1993/0501    
		if(nr != r->request.count) 
1993/0907    
		n -= nr; 
		if(nr != r->request.count || n == 0) 
1991/0911    
			break; 
1990/0227    
	} 
1991/0911    
	return cnt; 


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