Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 May 2024 12:45:14 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: ff7de3b4d32b - main - nextboot: Permit ZFS boot filesystems mounted at the pool's root
Message-ID:  <202405301245.44UCjEtB045408@gitrepo.freebsd.org>

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

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

commit ff7de3b4d32b64acb609af8a4e6e0b640dbd2973
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-05-30 12:44:55 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-05-30 12:44:55 +0000

    nextboot: Permit ZFS boot filesystems mounted at the pool's root
    
    This restores nextboot -k on ZFS setups where /boot is on the root
    dataset of a pool.
    
    Reviewed by:    jrtc27, glebius
    Fixes:          0c3ade2cf13d nextboot: fix nextboot -k on ZFS
    Sponsored by:   Chelsio Communications
    Differential Revision:  https://reviews.freebsd.org/D45306
---
 sbin/reboot/reboot.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c
index 1b806a90de1d..c6b0e0980c88 100644
--- a/sbin/reboot/reboot.c
+++ b/sbin/reboot/reboot.c
@@ -134,9 +134,9 @@ write_nextboot(const char *fn, const char *env, bool force)
 	if (zfs) {
 		char *slash;
 
-		if ((slash = strchr(sfs.f_mntfromname, '/')) == NULL)
-			E("Can't find ZFS pool name in %s", sfs.f_mntfromname);
-		*slash = '\0';
+		slash = strchr(sfs.f_mntfromname, '/');
+		if (slash != NULL)
+			*slash = '\0';
 		zfsbootcfg(sfs.f_mntfromname, force);
 	}
 



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