From nobody Thu May 30 12:45:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VqmDp3Qk2z5MZpT; Thu, 30 May 2024 12:45:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VqmDp2pqXz4VKL; Thu, 30 May 2024 12:45:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717073114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eyIIqDvzUhcQeDAjkCJYBtGabGukW7nSL/3WI1nWnhk=; b=n09yByVPIcr1GFkQyr1XpAUP7PJ8zEMHhKS6oAXGaXfHMwqj2KpNtq6XFwqidYdZMwVQPM d0q1oU5LqJ9LbwTbDZmwjj0XeTO96ULidqw6pvm/v0g25kKcg+EcmJ3VCgszz8WKdveBDU jGO7EX7sw9yfOrhGebPlV/PBDbKcJIQz7C9y8k71Ar+R42OAnsAy4jhs9uR3aT8IC6RDRO I/IryzIDcIkQjhgIL6Wz1jUouWtfJsX9BoMP3McKa5iWzr6yRzluspEvfe7lE4/A8gOYiz BhjJ1W7al9Q+TERdSAWDV1rPxzVxVpuZIelrSNe0vk6zhwvZCOZp/rBIModcjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717073114; a=rsa-sha256; cv=none; b=SeLWxskrT+GilKo9mvfmeWc/Yp36FJL2udMujPB/IwgZ8r1gHjpMsVBNOtAzv1o/wruSLg RFbq5wRB7Nxe1Z/G85+3N1GuJ3fvJd5Jb8Lln1+4fWWBiE+7spIFs28C/ej835v9fnxW+s 6wOqc/WuHo1JyLT+uffxg1uWE1nLiLUA3xOeJj8W0dpkLmJ2DjSZw6pEhceDxMJaTZ8V+m hz8HVcyM2nAxUVydvH+D4OHpxbNMXJC2DynoBA1TGg/gRTO8o1xla3wKD1GZsPGsKCWFfS 3hPw57tkmDQTiyx5hnVymr+ihQDsbAQpLCvqIatm03gdRDOSWUT6Xy734dPpEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717073114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eyIIqDvzUhcQeDAjkCJYBtGabGukW7nSL/3WI1nWnhk=; b=lrWWEYOXcsfgq56DOFJvaX8uUQ//oRkaS+oLtJ7tZ0gudJeEOYbLiK0Dt3GxC8ntJm4onU rNch9qLoUTYirek5S/wA0q3ntNKN0dC/JiWaFTIXMFziOww27OVlNMEpZQ0jC+Rdex2hrm oSSC+aXZker/Hv2l0tebd88tXfSQSJWHVaohefZXhxh4gu/MViiqJMl5rKUH6+pm7zz8h/ jRAHfjUBiDF8F3YfB8992RahjHF5z5UVhEq7/+SY95pg6pqGlrA7uoJMfI+Xjg3Bsh9E8J 6LxA3fFomS55I6AAzj36TnFfaLTaqcDuP4IepKPqqUXbCrPJzJsCOeNZ9QphVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VqmDp2HstzgPj; Thu, 30 May 2024 12:45:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44UCjE6G045411; Thu, 30 May 2024 12:45:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44UCjEtB045408; Thu, 30 May 2024 12:45:14 GMT (envelope-from git) Date: Thu, 30 May 2024 12:45:14 GMT Message-Id: <202405301245.44UCjEtB045408@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: ff7de3b4d32b - main - nextboot: Permit ZFS boot filesystems mounted at the pool's root List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff7de3b4d32b64acb609af8a4e6e0b640dbd2973 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ff7de3b4d32b64acb609af8a4e6e0b640dbd2973 commit ff7de3b4d32b64acb609af8a4e6e0b640dbd2973 Author: John Baldwin AuthorDate: 2024-05-30 12:44:55 +0000 Commit: John Baldwin 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); }