From nobody Sun Feb 19 06:48:24 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 4PKGN90FF8z3sr6h; Sun, 19 Feb 2023 06:48: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 4PKGN86cMCz3jBD; Sun, 19 Feb 2023 06:48:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676789304; 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=foCrF3epjHpnw68BMvEQYSalEpQAEZcz3vxakhoVffk=; b=vp7kMHSYx2wuzpDFXLSrtA7RusQcTLXHPAG0En7b6CCDyhlB1o+e4f8md7v92rdnvFJlTu x0a4YV92DN19q0J+wlIw0ecuvX4zb8WSoKKx72fiZ33huuD6HA09rdLCLnrHytpJwcUg+f NlXw1zccypVG9QQoeCJdGZaAbFa6vnPcDdaI79vVMIwAng5SLuL9y+ehHFUcOpYnFa4WY1 oRzIEOWXvJoT1xGkiWq1tD5Mue7CHEWN5n2tDmXXrnQKodSqztIVn6Eo5ehobmdci5Npd9 +uXXSFixPDe5EoFpTMoSNrUXpQH6TRCGEPvv0FV3jvVXsRMw7m0xlEUOTgw0sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676789304; 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=foCrF3epjHpnw68BMvEQYSalEpQAEZcz3vxakhoVffk=; b=NACw71IOiBPf4Qm9hCWg1p1/7jmJPMZ7vd0snDHdrcav0DuBQp3Tc2i1E4GQyRtCnZh9PF VP5cme0u+aXtn6XMkq+AqtsT3dPhCq3XqG4800j5JfJvIMDEtiQXWh68sDcqcqEDErBXBH Y/ZqnlahMxs6+9m7tNbK6mdwG88MpmU4JvX2012uZHmt8r/CFLC5S6KLnxT4k6wEAYYmhf eTQoAC+e8/3qIF/LnamkScis3cmWvfsazyC/sChyB4trZoPa3QMWfOooFVRnD9uINjWFd7 2MZV67lu7yh0fVSQVI4/X4bJ4pA1SM2B4AUg7Cy5v/UVXo2ceJNxIetsxb34bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676789304; a=rsa-sha256; cv=none; b=xOAU6EpNZ0Py6uN837+MtuFcsy5uVtMD4nLs5PNOkHd72qv1EvhXRy2PoRn8Bu8K5yDZoV jrN3mcZMQrdBQgMc86My+mbOYI2WsOcbhfP7+xfYp/4446hcT80grEHeASO+IZ6B3qoyD/ PFfEMQQPB1tyAex4lVLWCQ+7+IZEFCKQQ6vwg5vAyiOBnhHckBmjDcoggwNmbwr/JzN0Cc cKasmINg4AtTL9RopUw+NxgGjWtG++ouZuRzYHgpa+J6U4n51FRgW0e4tzyavH8icdH1tI TVagV1KGQ/3KBaQFnGlnh665BkLJ0YQLpw/chH3hNjmH6hr+D3aQEXKmf/y47A== 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 4PKGN85gYNzsLd; Sun, 19 Feb 2023 06:48:24 +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 31J6mOlY082585; Sun, 19 Feb 2023 06:48:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31J6mOiQ082584; Sun, 19 Feb 2023 06:48:24 GMT (envelope-from git) Date: Sun, 19 Feb 2023 06:48:24 GMT Message-Id: <202302190648.31J6mOiQ082584@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: 0c479a5c47db - releng/13.2 - efivar: Try harder to find label's efimedia 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/releng/13.2 X-Git-Reftype: branch X-Git-Commit: 0c479a5c47dbbba7b6ff3a867e0981749e3262a5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.2 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0c479a5c47dbbba7b6ff3a867e0981749e3262a5 commit 0c479a5c47dbbba7b6ff3a867e0981749e3262a5 Author: Warner Losh AuthorDate: 2023-02-16 16:36:03 +0000 Commit: Warner Losh CommitDate: 2023-02-19 06:46:46 +0000 efivar: Try harder to find label's efimedia If there's no efimedia attribute on the provider, and the provider's a glabel, then find the 'parent' geom. In this case, the provider's name is label-type/name, but the geom's label will that of the underlying device (eg ada0p1). If it is, recurisvely call find_geom_efimedia with the geom's name, which shuold have the efimedia attribute. Sponsored by: Netflix Reviewed by: corvink, manu, asomers Differential Revision: https://reviews.freebsd.org/D38614 Approved by: re@ (cperciva) (cherry picked from commit ccf2121d59ac51e1a0287d75262d48018d09cad6) (cherry picked from commit 9ad4c0468f1924cf7bdb9830bb781de9ca095c61) --- lib/libefivar/efivar-dp-xlate.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/libefivar/efivar-dp-xlate.c b/lib/libefivar/efivar-dp-xlate.c index 1b30d1dfb143..effc8a2de475 100644 --- a/lib/libefivar/efivar-dp-xlate.c +++ b/lib/libefivar/efivar-dp-xlate.c @@ -527,6 +527,15 @@ find_geom_efimedia(struct gmesh *mesh, const char *dev) if (pp == NULL) return (NULL); efimedia = geom_pp_attr(mesh, pp, "efimedia"); + + /* + * If this device doesn't hav an efimedia attribute, see if it is a + * glabel node, and if so look for the underlying provider to get the + * efimedia attribute from. + */ + if (efimedia == NULL && + strcmp(pp->lg_geom->lg_class->lg_name, G_LABEL) == 0) + efimedia = find_geom_efimedia(mesh, pp->lg_geom->lg_name); if (efimedia == NULL) return (NULL); return strdup(efimedia);