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

1999/1209/pc/devusb.c (diff list | history)

1999/1209/sys/src/9/pc/devusb.c:1389,13941999/1230/sys/src/9/pc/devusb.c:1389,1398 (short | long | prev | next)
1999/1005    
	 * Top level directory contains the name of the device. 
	 */ 
	if(c->qid.path == CHDIR){ 
1999/1230    
		if(s == DEVDOTDOT){ 
			devdir(c, (Qid){CHDIR, 0}, "#U", 0, eve, 0555, dp); 
			return 1; 
		} 
1999/1005    
		if(s == 0){ 
			devdir(c, (Qid){CHDIR|Q2nd, 0}, "usb", 0, eve, 0555, dp); 
			return 1; 
1999/1209/sys/src/9/pc/devusb.c:1401,14061999/1230/sys/src/9/pc/devusb.c:1405,1414
1999/1005    
	 */ 
	t = QID(c->qid); 
	if(t < Q3rd){ 
1999/1230    
		if(s == DEVDOTDOT){ 
			devdir(c, (Qid){CHDIR, 0}, "#U", 0, eve, 0555, dp); 
			return 1; 
		} 
1999/1005    
		if(s < nelem(usbdir2)){ 
			tab = &usbdir2[s]; 
			devdir(c, tab->qid, tab->name, tab->length, eve, tab->perm, dp); 
1999/1209/sys/src/9/pc/devusb.c:1423,14281999/1230/sys/src/9/pc/devusb.c:1431,1440
1999/1005    
	 */ 
	path = c->qid.path&~(CHDIR|QMASK);	/* slot component */ 
	q.vers = c->qid.vers; 
1999/1230    
	if(s == DEVDOTDOT){ 
		devdir(c, (Qid){CHDIR|Q2nd, 0}, "usb", 0, eve, 0555, dp); 
		return 1; 
	} 
1999/1005    
	if(s < nelem(usbdir3)){ 
		Dirtab *tab = &usbdir3[s]; 
		q.path = path | tab->qid.path; 


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