Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Sep 2023 18:05:22 GMT
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: d13550f0c9c2 - main - stand/loader.efi: fix regression with ignoring nvstore
Message-ID:  <202309111805.38BI5M9Y007414@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=d13550f0c9c283e6bf7a2a3ec870f92a882c9f21

commit d13550f0c9c283e6bf7a2a3ec870f92a882c9f21
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2023-09-11 18:04:48 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2023-09-11 18:04:48 +0000

    stand/loader.efi: fix regression with ignoring nvstore
    
    To read/update the boot loader nvstore, we always need to call
    zfs_attach_nvstore() regardless of whether we use bootonce key
    in nvstore or the bootfs property of the pool.  The call was
    unintentionally left in the block of code that is processed
    only when bootonce key is present.
    
    In particular this fixes broken 'nextboot -k'.
    
    Reviewed by:            imp
    Differential Revision:  https://reviews.freebsd.org/D41795
    Fixes:                  e3e2681d0ec28d6661fef6da76c9479049e2761c
---
 stand/efi/loader/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c
index 39e32a56adc0..11b10dd44d5e 100644
--- a/stand/efi/loader/main.c
+++ b/stand/efi/loader/main.c
@@ -264,8 +264,8 @@ probe_zfs_currdev(uint64_t guid)
 		printf("zfs bootonce: %s\n", buf);
 		set_currdev(buf);
 		setenv("zfs-bootonce", buf, 1);
-		(void)zfs_attach_nvstore(&currdev);
 	}
+	(void)zfs_attach_nvstore(&currdev);
 
 	return (sanity_check_currdev());
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202309111805.38BI5M9Y007414>