ofrootfound();
if(system_type == OFWMACH) { ofrootfound(); }
struct  device *parsedisk __P((char *, int, int, dev_t *));void    setroot __P((void));void	configure __P((void));void	swapconf __P((void));extern void	dumpconf __P((void));static int findblkmajor __P((struct device *));static struct device * getdisk __P((char *, int, int, dev_t *));struct device * getdevunit __P((char *, int));static struct devmap * findtype __P((char **));void makebootdev __P((char *cp));int getpno __P((char **));/* * The following several variables are related to * the configuration process, and are used in initializing * the machine. */int	cold = 1;	/* if 1, still working on cold-start */char	bootdev[16];	/* to hold boot dev name */struct device *bootdv = NULL;/* *  Configure all devices found that we know about. *  This is done at boot time. */voidconfigure(){	(void)splhigh();	/* To be really sure.. */	if(config_rootfound("mainbus", "mainbus") == 0)		panic("no mainbus found");	ofrootfound();	(void)spl0();	setroot();	swapconf();	cold = 0;}/* * Configure swap space and related parameters. */voidswapconf(){	register struct swdevt *swp;	register int nblks;	for (swp = swdevt; swp->sw_dev != NODEV; swp++) {		if (bdevsw[major(swp->sw_dev)].d_psize) {			nblks =			  (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev);			if (nblks != -1 &&			    (swp->sw_nblks == 0 || swp->sw_nblks > nblks))				swp->sw_nblks = nblks;			swp->sw_nblks = ctod(dtoc(swp->sw_nblks));		}	}#if 0	dumpconf();#endif}static	struct nam2blk {	char *name;	int  maj;} nam2blk[] = {	{ "sd",		2 },	/* 2 = sd */	{ "ofdisk",	4 },	/* 2 = ofdisk */};static intfindblkmajor(dv)	struct device *dv;{	char *name = dv->dv_xname;	register int i;	for (i = 0; i < sizeof(nam2blk)/sizeof(nam2blk[0]); ++i)		if (strncmp(name, nam2blk[i].name, strlen(nam2blk[0].name)) == 0)			return (nam2blk[i].maj);	 return (-1);}static struct device *getdisk(str, len, defpart, devp)	char *str;	int len, defpart;	dev_t *devp;{	register struct device *dv;	if ((dv = parsedisk(str, len, defpart, devp)) == NULL) {		printf("use one of:");		for (dv = alldevs.tqh_first; dv != NULL;		    dv = dv->dv_list.tqe_next) {			if (dv->dv_class == DV_DISK)				printf(" %s[a-h]", dv->dv_xname);#ifdef NFSCLIENT			if (dv->dv_class == DV_IFNET)				printf(" %s", dv->dv_xname); #endif		}		printf("\n");	}	return (dv);}struct device *parsedisk(str, len, defpart, devp)	char *str;	int len, defpart;	dev_t *devp;{	register struct device *dv;	register char *cp, c;	int majdev, part;	if (len == 0)		return (NULL);	cp = str + len - 1;	c = *cp;	if (c >= 'a' && (c - 'a') < MAXPARTITIONS) {		part = c - 'a';		*cp = '\0';	} else		part = defpart;	for (dv = alldevs.tqh_first; dv != NULL; dv = dv->dv_list.tqe_next) {		if (dv->dv_class == DV_DISK &&		    strcmp(str, dv->dv_xname) == 0) {			majdev = findblkmajor(dv);			if (majdev < 0)				panic("parsedisk");			*devp = MAKEDISKDEV(majdev, dv->dv_unit, part);			break;		}#ifdef NFSCLIENT		if (dv->dv_class == DV_IFNET &&		    strcmp(str, dv->dv_xname) == 0) {			*devp = NODEV;			break;		}#endif	}	*cp = c;	return (dv);}