From nobody Fri Jan 13 21:24:54 2023 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 4NtvZb1Zhhz2qksV; Fri, 13 Jan 2023 21:24:55 +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 4NtvZb0pgdz415y; Fri, 13 Jan 2023 21:24:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673645095; 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=UK+dmOPiIJu6HD9YvkP7+QvYzU4eybDO1x4iTg7P7V4=; b=kjJ5U3IfUpQbWWrJoYno/D1bTqQKGP2cRXAJ5MH9cPt6w+rVhbNkO1pQKHQmRPbXXYw0YR PyOZ4JCYZtPzJlrjTWsJGwn7Q0jP72+ExA9EcsCPap8tVb03pmXGWcnm5q9u85qy1/9dxc wRcluOURzqXLMKkdqsPb2tjjrsFFWmg1MxLbM0fby9Vbxs9nX7bxT1rFeJpVqFTMyViqlP YLjCUIZDlS7y/XXNh96UEFWkN9u+Oh6/v/1KreXmniGsyGFhDPtNC0+XDx8OdpsZVEYOJO 2FAvvQUkCzD3B2XZK0dRmKCW8PJ0hZ6CtjqYiRVUFi1iKDV8SqJHhhlQQA4bmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673645095; 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=UK+dmOPiIJu6HD9YvkP7+QvYzU4eybDO1x4iTg7P7V4=; b=IuI3xpLSpi91neMqzVrfIwAIWtqjoxxlSFCy6ADTNT9yKcZo5d50zNN3t5FXJ62m7V5DBI BeyNvOb1fNiAeg4d10vUch6VSgifMcFhFl8k4PggbTEO0RQ4S+cXZT3UBmVvnF4CNoUHOO XQXeFaZ+6s6kk9Jlj12M2dUZM6dhztyGnxu1NbFs52KYUHHh8FfoDTaqZEWYM/16ku4Gg3 tD3sZhDkwwx9aggnrqikS0wto1AaimcPK9/X392fa2T7nNL2WHZLooyA3+gGmhyoLxA5zh HO7mudGnTUe9UNuM+FG9gZStRJ4VMJMVHo63UwQ0z3/z6mVHWrNcBjwagAXC4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673645095; a=rsa-sha256; cv=none; b=wuWJwJFPR87QTvDiRzg90shZ3w+5HTwxKpuqZwzKJq02dpqnYQbMzfrCwJ00DPkYptRw99 nQeJF/fMQXQO/4kreTrU/VEfOcBVfkOZIx86ATKyZemNrytDx97twQ/p2OVNj1/mChV7BO arAmYb06lrNX8vUw7Y8f5eQqAP+wFtq0isAhsRmOaK7wbggx2ioNpDxJCnl+VysQslDqN8 GMlSnFOifyjUu1n3n4IoNNVHOdJclB9LcRPl7FjvJoWK993KJlwQE3a1tnBF9tDh3zC6SK URz+gOCNmIwgloNsrBj3EOA3YMFjeEQH7dfJmrvuunwporK8tS7VZR8Y3GEabw== 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 4NtvZZ6qm5zNDB; Fri, 13 Jan 2023 21:24:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30DLOsAa041027; Fri, 13 Jan 2023 21:24:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30DLOs2I041026; Fri, 13 Jan 2023 21:24:54 GMT (envelope-from git) Date: Fri, 13 Jan 2023 21:24:54 GMT Message-Id: <202301132124.30DLOs2I041026@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: eb1795782cfc - main - kboot: Use standard set_currdev 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eb1795782cfc43523345f78737cc22277cea5056 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=eb1795782cfc43523345f78737cc22277cea5056 commit eb1795782cfc43523345f78737cc22277cea5056 Author: Warner Losh AuthorDate: 2023-01-13 21:21:16 +0000 Commit: Warner Losh CommitDate: 2023-01-13 21:22:39 +0000 kboot: Use standard set_currdev Use the standard set_currdev instead of the (now very old) copy of setting currdev and loaddev directly. We do this only when we don't go find the ZFS pool to boot from. Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D38012 --- stand/kboot/main.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/stand/kboot/main.c b/stand/kboot/main.c index 91bc4c06e452..52c135f78582 100644 --- a/stand/kboot/main.c +++ b/stand/kboot/main.c @@ -198,15 +198,22 @@ main(int argc, const char **argv) * on active BEs, etc */ hostdisk_zfs_find_default(); - } + } else #endif + { + /* + * Otherwise, honor what's on the command line. If we've been + * given a specific ZFS partition, then we'll honor it w/o BE + * processing that would otherwise pick a different snapshot to + * boot than the default one in the pool. + */ + set_currdev(bootdev); + } printf("Boot device: %s with hostfs_root %s\n", bootdev, hostfs_root); printf("\n%s", bootprog_info); - setenv("currdev", bootdev, 1); - setenv("loaddev", bootdev, 1); setenv("LINES", "24", 1); setenv("usefdt", "1", 1);