Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146251579
D39415.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
925 B
Referenced Files
None
Subscribers
None
D39415.id.diff
View Options
diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c
--- a/stand/efi/loader/main.c
+++ b/stand/efi/loader/main.c
@@ -252,7 +252,6 @@
{
char *devname;
struct zfs_devdesc currdev;
- char *buf = NULL;
bool bootable;
currdev.dd.d_dev = &zfs_dev;
@@ -265,18 +264,16 @@
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);
- 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);
+ set_currdev(buf);
+ setenv("zfs-bootonce", buf, 1);
}
+ (void)zfs_attach_nvstore(&currdev);
}
+
return (bootable);
}
#endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 2, 3:20 AM (53 m, 21 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29138496
Default Alt Text
D39415.id.diff (925 B)
Attached To
Mode
D39415: stand/efi: Simplify code here
Attached
Detach File
Event Timeline
Log In to Comment