cnpollc(FALSE);
rootconf(){	register struct genericconf *gc;	int unit, part = 0;	char *num;#ifdef INSTALL	if (B_TYPE(bootdev) == 2) {		printf("\n\nInsert file system floppy...\n");		if (!(boothowto & RB_ASKNAME))			cngetc();	}#endif	if (boothowto & RB_ASKNAME) {		char name[128];retry:		printf("root device? ");		getsn(name, sizeof name);		if (*name == '\0')			goto noask;		for (gc = genericconf; gc->gc_driver; gc++)			if (gc->gc_driver->cd_ndevs &&			    strncmp(gc->gc_name, name,			    strlen(gc->gc_name)) == 0)				break;		if (gc->gc_driver) {			num = &name[strlen(gc->gc_name)];			unit = -2;			do {				if (unit != -2 && *num >= 'a' &&				    *num <= 'a'+MAXPARTITIONS-1 &&				    num[1] == '\0') {					part = *num++ - 'a';					break;				}				if (unit == -2)					unit = 0;				unit = (unit * 10) + *num - '0';				if (*num < '0' || *num > '9')					unit = -1;			} while (unit != -1 && *++num);			if (unit < 0) {				printf("%s: not a unit number\n",				    &name[strlen(gc->gc_name)]);			} else if (unit > gc->gc_driver->cd_ndevs ||			    gc->gc_driver->cd_devs[unit] == NULL) {				printf("%d: no such unit\n", unit);			} else {				printf("root on %s%d%c\n", gc->gc_name, unit,				    'a' + part);				rootdev = makedev(gc->gc_major,				    unit * MAXPARTITIONS + part);				goto doswap;			}		}		printf("use one of: ");		for (gc = genericconf; gc->gc_driver; gc++) {			for (unit=0; unit < gc->gc_driver->cd_ndevs; unit++) {				if (gc->gc_driver->cd_devs[unit])					printf("%s%d[a-%c] ", gc->gc_name,					    unit, 'a'+MAXPARTITIONS-1);			}		}		printf("\n");		goto retry;	}noask:	if (mountroot == NULL) {		/* `swap generic' */		setroot();	} else {		/* preconfigured */		int  majdev, unit, part;		majdev = major(rootdev);		if (findblkname(majdev) == NULL)			return;		part = minor(rootdev) % MAXPARTITIONS;		unit = minor(rootdev) / MAXPARTITIONS;		printf("root on %s%d%c\n", findblkname(majdev), unit, part + 'a');		return;	}doswap:#ifndef DISKLESS	mountroot = dk_mountroot;#endif	swdevt[0].sw_dev = argdev = dumpdev =	    makedev(major(rootdev), minor(rootdev) + 1);	/* swap size and dumplo set during autoconfigure */}