From nobody Tue Jan 24 22:14:35 2023 X-Original-To: dev-commits-src-branches@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 4P1h8r2pgPz3bgsg; Tue, 24 Jan 2023 22:14:36 +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 4P1h8q2JhVz3M7v; Tue, 24 Jan 2023 22:14:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598475; 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=EFRdoP99Fss8+F6MfPvXHbs7SdU81iWK7zFP2wS0y3A=; b=gdDc2aqf5zmJvWFJ46ESPcV+iLcakG/Mb3Vyoi2uyo+R/kY3cUwM+eI6nese4kt90UNtsd BGoFUrJ0HhECTZdjOnjear2cruIXITeBEqIokQZdZ+cVQwCzqDU+AodscJAt64nPuLLQTa 0CJIOVL+q09a2i9IaeBKcOq0UO3Aw79wg+axR6z8W6YcAjhNJiP4WPjs4HlXRtFS9DG+YE 9uwLPm+035c0eCubMV+CInNOvCT37z0rcQc1oZqXV/uaX8e37ZWuxpvrrrhu3p+psQdAwU HXsO31Hbt2FkEgmSSHtKL90pDR7K9+da1O7gY/Uxe1o7X4183RoiiF8nwxLq3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598475; 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=EFRdoP99Fss8+F6MfPvXHbs7SdU81iWK7zFP2wS0y3A=; b=haxrDaeLA4VurkYy64/oJ/2QZG7NyIgRMZuLinh0NPiS+TIlbmzetrET8trS2Lw4OTi1Pw Q+zG19lJQqVvw3H/yzh2tUXV0ItBf9Aloeazt97R4V3H3rryaCnCRTV2erBihadUwgqe0v EmaKC+SHvE5VJCMAwyTUEj+Sdf4H0fHJHWw/BikMmQcuerRlyAE7C4+v/ALfCNSo1R7Zwx IECUgMW52BNKh2wIQYpv1W+O7xwUlsLg1cc+VN0A54m5NMt7kCNWmf4PjdbVXk1lyIPK0Y Lwtay/DKVNKqDOoNhYt9IpTf0mxG73KSqF4vFTrjZC5SnNDwgU5gEeopzTSjNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674598475; a=rsa-sha256; cv=none; b=y3lk13l7S3B9O5fGwBMH8YuwrfYzwcWVzv1TiiPkGM32rCgg5Go7mvOCgu2QF0lKX9twIK U034eJggPjcr0/D0Da6N+BB+O1x082PUhq7JEkOG4/Bh3eK2BNsGSyXVju3K91hmhRSTo1 bZRNnnDQzFA2mAh4uKiLBqX0B+3JLO/LrAS+33ENJjpN8gNP4ElfcD1Ay58MTglI6/wuXJ 9ZvImQA6eeev4VwJLI5JdmVbUMqZEuhcmZxOnwxwZcNFYCCr5kYvRFlyU2h4g9oITZEWsg /CN+VeQisf/vrNsivLOL01vS8bQdMufyLMkhwgZrtYXaKKo4nYXoCV3rlRmVeQ== 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 4P1h8q1Pc9zQfj; Tue, 24 Jan 2023 22:14:35 +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 30OMEZxP090018; Tue, 24 Jan 2023 22:14:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30OMEZ1T090017; Tue, 24 Jan 2023 22:14:35 GMT (envelope-from git) Date: Tue, 24 Jan 2023 22:14:35 GMT Message-Id: <202301242214.30OMEZ1T090017@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: f9ab67f200a4 - stable/13 - kboot: Use standard set_currdev List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: f9ab67f200a4c0e5fabdcd00332eac474848ab3a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f9ab67f200a4c0e5fabdcd00332eac474848ab3a commit f9ab67f200a4c0e5fabdcd00332eac474848ab3a Author: Warner Losh AuthorDate: 2023-01-13 21:21:16 +0000 Commit: Warner Losh CommitDate: 2023-01-24 21:49:47 +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 (cherry picked from commit eb1795782cfc43523345f78737cc22277cea5056) --- 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);