while (ncp = bios_get_path_component(cp, namebuf, &i)) {
while ((ncp = bios_get_path_component(cp, namebuf, &i)) != NULL) {
devopen(struct open_file *f, const char *fname, char **file){	const char *cp, *ncp, *ecp;	struct devsw *dp;	int partition = 0;	char namebuf[256];	char devname[32];	int rc, i, n;	ecp = cp = fname;	/*	 *  Scan the component list and find device and partition.	 */	while (ncp = bios_get_path_component(cp, namebuf, &i)) {		if ((strcmp(namebuf, "partition") == 0) ||		    (strcmp(namebuf, "partition") == 0)) {			partition = i;			if (USE_SGI_PARTITIONS)				ecp = ncp;		} else			ecp = ncp;		/* XXX do this with a table if more devs are added */		if (strcmp(namebuf, "scsi") == 0)			strncpy(devname, namebuf, sizeof(devname)); 		cp = ncp;	}	memcpy(namebuf, fname, ecp - fname);	namebuf[ecp - fname] = '\0';	/*	 *  Dig out the driver.	 */	dp = devsw;	n = ndevs;	while(n--) {		if (strcmp (devname, dp->dv_name) == 0) {			rc = (dp->dv_open)(f, namebuf, partition, 0);			if (!rc) {				f->f_dev = dp;				if (file && *cp != '\0')					*file = (char *)cp;			}			return (rc);		}		dp++;	}	return ENXIO;}