Changeset View
Changeset View
Standalone View
Standalone View
stand/i386/zfsboot/zfsboot.c
Show First 20 Lines • Show All 201 Lines • ▼ Show 20 Lines | main(void) | ||||
bootinfo.bi_extmem = bios_extmem / 1024; | bootinfo.bi_extmem = bios_extmem / 1024; | ||||
bootinfo.bi_memsizes_valid++; | bootinfo.bi_memsizes_valid++; | ||||
bootinfo.bi_bios_dev = *(uint8_t *)PTOV(ARGS); | bootinfo.bi_bios_dev = *(uint8_t *)PTOV(ARGS); | ||||
/* 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. */ | |||||
env_setenv("currdev", EV_VOLATILE, "", i386_setcurrdev, | |||||
env_nounset); | |||||
for (i = 0; devsw[i] != NULL; i++) | for (i = 0; devsw[i] != NULL; i++) | ||||
if (devsw[i]->dv_init != NULL) | if (devsw[i]->dv_init != NULL) | ||||
(devsw[i]->dv_init)(); | (devsw[i]->dv_init)(); | ||||
disk_parsedev(&devdesc, boot_devname + 4, NULL); | disk_parsedev(&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, | ||||
▲ Show 20 Lines • Show All 500 Lines • Show Last 20 Lines |