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

1992/0114/port/devwren.c (diff list | history)

1992/0111/sys/src/9/port/devwren.c:55,661992/0114/sys/src/9/port/devwren.c:55,66 (short | long | prev | next)
1991/1019    
	if(p == 0 || p[0] == '\0') 
		return 0; 
1991/0823    
	if(p[0] < '0' || p[0] > '7') 
1991/1019    
		errors("bad scsi drive specifier"); 
1992/0114    
		error(Ebadarg); 
1991/1019    
	drive = p[0] - '0'; 
	unit = 0; 
	if(p[1]){ 
		if(p[1] != '.' || p[2] < '0' || p[2] > '7' || p[3] != '\0') 
			errors("bad scsi unit specifier"); 
1992/0114    
			error(Ebadarg); 
1991/1019    
		unit = p[2] - '0'; 
	} 
	return (drive << 3) | unit; 
1992/0111/sys/src/9/port/devwren.c:197,2041992/0114/sys/src/9/port/devwren.c:197,204
1991/1203    
	ulong block, n, max, x; 
1991/0823    
 
	d = &wren[DRIVE(c->qid.path)]; 
1991/0927    
	if(d->npart == 0) 
1991/1019    
		errors("drive repartitioned"); 
1992/0114    
	if(d->npart == 0)			/* drive repartitioned */ 
		error(Eio); 
1991/0823    
	p = &d->p[PART(c->qid.path)]; 
 
	block = offset / d->bytes + p->start; 


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