Changeset View
Changeset View
Standalone View
Standalone View
stand/i386/zfsboot/zfsboot.c
Show First 20 Lines • Show All 205 Lines • ▼ Show 20 Lines | main(void) | ||||
/* Set up fall back device name. */ | /* Set up fall back device name. */ | ||||
snprintf(boot_devname, sizeof (boot_devname), "disk%d:", | snprintf(boot_devname, sizeof (boot_devname), "disk%d:", | ||||
bd_bios2unit(bootinfo.bi_bios_dev)); | bd_bios2unit(bootinfo.bi_bios_dev)); | ||||
/* Set up currdev variable to have hooks in place. */ | /* Set up currdev variable to have hooks in place. */ | ||||
env_setenv("currdev", EV_VOLATILE, "", i386_setcurrdev, | env_setenv("currdev", EV_VOLATILE, "", i386_setcurrdev, | ||||
env_nounset); | env_nounset); | ||||
for (i = 0; devsw[i] != NULL; i++) | devinit(); | ||||
if (devsw[i]->dv_init != NULL) | |||||
(devsw[i]->dv_init)(); | |||||
/* XXX assumes this will be a disk, but it looks likely give above */ | /* XXX assumes this will be a disk, but it looks likely give above */ | ||||
disk_parsedev((struct devdesc **)&devdesc, boot_devname + 4, NULL); | disk_parsedev((struct devdesc **)&devdesc, boot_devname + 4, NULL); | ||||
bootdev = MAKEBOOTDEV(dev_maj[DEVT_DISK], devdesc->d_slice + 1, | bootdev = MAKEBOOTDEV(dev_maj[DEVT_DISK], devdesc->d_slice + 1, | ||||
devdesc->dd.d_unit, | devdesc->dd.d_unit, | ||||
devdesc->d_partition >= 0 ? devdesc->d_partition : 0xff); | devdesc->d_partition >= 0 ? devdesc->d_partition : 0xff); | ||||
free(devdesc); | free(devdesc); | ||||
▲ Show 20 Lines • Show All 498 Lines • Show Last 20 Lines |