Page MenuHomeFreeBSD

D39416.id119847.diff
No OneTemporary

D39416.id119847.diff

diff --git a/stand/kboot/hostdisk.c b/stand/kboot/hostdisk.c
--- a/stand/kboot/hostdisk.c
+++ b/stand/kboot/hostdisk.c
@@ -587,18 +587,15 @@
bootable = sanity_check_currdev();
if (bootable) {
- buf = malloc(VDEV_PAD_SIZE);
- if (buf != NULL) {
- if (zfs_get_bootonce(&currdev, OS_BOOTONCE, buf,
- VDEV_PAD_SIZE) == 0) {
- printf("zfs bootonce: %s\n", buf);
- if (setcurrdev)
- set_currdev(buf);
- setenv("zfs-bootonce", buf, 1);
- }
- free(buf);
- (void)zfs_attach_nvstore(&currdev);
+ char buf[VDEV_PAD_SIZE];
+
+ if (zfs_get_bootonce(&currdev, OS_BOOTONCE, buf, sizeof(buf)) == 0) {
+ printf("zfs bootonce: %s\n", buf);
+ if (setcurrdev)
+ set_currdev(buf);
+ setenv("zfs-bootonce", buf, 1);
}
+ (void)zfs_attach_nvstore(&currdev);
init_zfs_boot_options(devname);
}
return (bootable);

File Metadata

Mime Type
text/plain
Expires
Mon, Feb 9, 3:07 AM (17 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28529130
Default Alt Text
D39416.id119847.diff (845 B)

Event Timeline