From nobody Tue Feb 20 03:54:25 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 4Tf5BT3xZvz5BC4R; Tue, 20 Feb 2024 03:54:25 +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 4Tf5BT2nWzz4CQq; Tue, 20 Feb 2024 03:54:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708401265; 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=iAppBMpE6uD9AGRzi9VyX03AG6OsFCUtTH77yhlmaC8=; b=KPSquVBpqBj0aWuiazh+ls9w+VFV3EfKSl6UwCgcsv5msIT0rm0HgOWBSRFPr5+5+BlYSa hMZltgxRglU/V8/kN2ReuMIcOClOU4mdynaSq2fgEqPg+hr7sxqCCAua2S4pRz2znJa1Um VcSJ+vhXbL4w9KO1KCLK2cpG7q3A8LawPSDQ9gxRFICxJyqdeZ52Avgm+Xsk6EYqyq+2LI BRbniv0T9KMNYKx3wMxCp3sPgiRUpsbskJJVQcJwUP4lX1lylFZ4ufMnS0yupZl1ySFn9y 2t45AFEQu4UkcGeG4s+h4w8wwz+PyZnOT6dEYZ8sghKpCMZvaPVp6AyC4h6XUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708401265; 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=iAppBMpE6uD9AGRzi9VyX03AG6OsFCUtTH77yhlmaC8=; b=DyaPdeYK46eYXOlDRRiFdbZUWcQGVnggHnN/PeVyokFAkkWuawtbJcw1BkLBp+W0brFc7v NQtE14OTDwXgoysp1NctGoJZVfNL6d1KzG8XnAi0QeujMsfy22K5EnHiQDqoLpX/A8dkai 7RLp33IOHTL6ZAUv0r8Koj+i/g4fS6crQ9RR/ubRCN+Ie7YELr/q4XQUUVAhmSdrkYiqXO mNlXZbGDQN6GBXew+Pd+P52cU44CB5FQ1XwG8sUKzv0U/ublNTgYg3F7tVrtG+tteF3uFm KHU/Ba81n0C59MaRBw4qw9bVhJ3h4MBicJoQhdA1/71PxaFze5WoAIT19uq0TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708401265; a=rsa-sha256; cv=none; b=pIGMYfpRLyVS+M0MzPxNb8eLpBHpy0+RbFc7wn5llUuTQU7ApPScT8VVOq5qSigzwg2gn/ Hez18d1jvvb8fF49p797x3X4A0VFjrwqcfTBYszGUmpcf1kxLiJwFfyFhnjpLigdEQkrja KcsNa2dWvMxO6NcrNc1yaX3EVm8BogKmW/kAJQGa5rED4PDFqgm8FbJcPijp7s4Ls/IH/K pMg+h8qU1YK1xSIi1a4S7P30UIeJGqZw17M2KSSZqpZdeiLM83HMiXscwB+PZEKbK2Wmxp Smdk3XHb9F42Qc3rxO9vSbqrvG8400acHRxpD+feOTVrhhYTTVVO2P966RZO5g== 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 4Tf5BT1sQJz139V; Tue, 20 Feb 2024 03:54:25 +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 41K3sPbo025632; Tue, 20 Feb 2024 03:54:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41K3sPeT025629; Tue, 20 Feb 2024 03:54:25 GMT (envelope-from git) Date: Tue, 20 Feb 2024 03:54:25 GMT Message-Id: <202402200354.41K3sPeT025629@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 0c3ade2cf13d - main - nextboot: fix nextboot -k on ZFS 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c3ade2cf13df1ed5cd9db4081137ec90fcd19d0 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=0c3ade2cf13df1ed5cd9db4081137ec90fcd19d0 commit 0c3ade2cf13df1ed5cd9db4081137ec90fcd19d0 Author: Gleb Smirnoff AuthorDate: 2024-02-20 03:51:22 +0000 Commit: Gleb Smirnoff CommitDate: 2024-02-20 03:51:22 +0000 nextboot: fix nextboot -k on ZFS zfsbootcfg(1) expects pool name to operate on, not currently mounted filesystem name. Fixes: fd6d47375a78fbf0737012b7cc11180291781e8b --- sbin/reboot/reboot.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c index 7ea4d50eaf74..ac3927cc2432 100644 --- a/sbin/reboot/reboot.c +++ b/sbin/reboot/reboot.c @@ -130,6 +130,11 @@ 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'; zfsbootcfg(sfs.f_mntfromname, force); }