Changeset View
Changeset View
Standalone View
Standalone View
stand/efi/loader/main.c
Show First 20 Lines • Show All 269 Lines • ▼ Show 20 Lines | probe_zfs_currdev(uint64_t guid) | ||||
set_currdev_devdesc((struct devdesc *)&currdev); | set_currdev_devdesc((struct devdesc *)&currdev); | ||||
devname = efi_fmtdev(&currdev); | devname = efi_fmtdev(&currdev); | ||||
init_zfs_bootenv(devname); | init_zfs_bootenv(devname); | ||||
rv = sanity_check_currdev(); | rv = sanity_check_currdev(); | ||||
if (rv) { | if (rv) { | ||||
buf = malloc(VDEV_PAD_SIZE); | buf = malloc(VDEV_PAD_SIZE); | ||||
if (buf != NULL) { | if (buf != NULL) { | ||||
if (zfs_nextboot(&currdev, buf, VDEV_PAD_SIZE) == 0) { | if (zfs_get_bootonce(&currdev, "command", buf, | ||||
VDEV_PAD_SIZE) == 0) { | |||||
printf("zfs nextboot: %s\n", buf); | printf("zfs nextboot: %s\n", buf); | ||||
set_currdev(buf); | set_currdev(buf); | ||||
setenv("zfs-bootonce", buf, 1); | |||||
} | } | ||||
free(buf); | free(buf); | ||||
} | } | ||||
} | } | ||||
return (rv); | return (rv); | ||||
} | } | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 1,300 Lines • Show Last 20 Lines |