From nobody Sun Feb 19 00:48:37 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 4PK6P14097z3s8jJ; Sun, 19 Feb 2023 00:48:37 +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 4PK6P13YSTz42vb; Sun, 19 Feb 2023 00:48:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676767717; 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=Pe6W+jOjQef5ECAM5pD/lJE8JptMrafghpwHmmUiI8Q=; b=F8LzHQGVf6ICaMsyGaeRtV0mi7VeP8yXXc9saXrhDYR8wyN0tDuDP/pi2lZV51ffylPi5e ssHVsEcuxcg+Iq32oi1XO8FWLfpPYOwy0ghEvMIr7w3SU7Ny8qwL+e/UoD4IOsbedbzeou o5zt3U9I05E42rc6E6fs4ZT52HNIrNgBR8o6ci54cqPMGdq91hcRK5Bh23AfJCqV/n7Vuq KsnDR3NPIF/kRvUvbc4MGvZHm4GouCfe2XrSXqckg3FpD9k87rlyf4xi4Hrz6WlmkqbfQb h7znWYsFylnfKFgwXtb8W5rUJb/HP15uY4+RfN2ExstEETB5N1EAjmG4XxTZ5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676767717; 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=Pe6W+jOjQef5ECAM5pD/lJE8JptMrafghpwHmmUiI8Q=; b=HCMF+ram5zTBZI9SmvKz0K2VqzuXKohrXkd5iXAkvrsZp2kPXZEMNB/BZY0oFhXt/c2jju Geb1R9mdTd7Y2Epg4my7IXJEYHsfyArabu8Xn3Me7qYOlL0yJXoViigSRCkKS+9UMErEe2 p48Z6Mk/DAqwgHyjLX2JVT48dlzlXBZiKG8079AAIQi8l7e2PLKFKhoLBwz+9z38sGMlCU 80+p1yDxrqzNNT1AOFeIOoUypy9vaPbc9cAi6EisClgr9Xsd2fDOcShwgjC5dKydUGo/3t 33/tZlSeaMtAbVZNk7Q0rQsy4ppjObnMpxJedRA+0dySwUcf70PLVYdSc7ATsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676767717; a=rsa-sha256; cv=none; b=oOzvlUI9XY/UBMnLABOZdeceoRcN5INzZosBZRkqwtBxomvok2ti7hdCTkg7jEgO0RpHdn Y13VvpuDPh3twh0oavdDNh7xo0aQa5+yv4hBbQs3ZbCx0us86D8Fep84C9x6SdV0rxb5XD LsplJdNZxZw4bKMPg2yAg+aN18IV4yyUhnhorufBTI8u2cfUO1U3e4lhbJkeDRHyoxqmbj 3rNh1ClDazfy1mwRrxrJ6wwe7qPjFU5OkfV2BO3YV+of0EG6Mk5Z0AZUY/m8iX7BXzp4+Z kh5EPOEH4vAASaPgWJQ5VHY3cfEiwHfRfLCPO9E3pCJZgnVtVvfw4Gbi0ockmQ== 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 4PK6P12bthzj9K; Sun, 19 Feb 2023 00:48:37 +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 31J0mbHP069581; Sun, 19 Feb 2023 00:48:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31J0mbst069580; Sun, 19 Feb 2023 00:48:37 GMT (envelope-from git) Date: Sun, 19 Feb 2023 00:48:37 GMT Message-Id: <202302190048.31J0mbst069580@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: 9ad4c0468f19 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 9ad4c0468f1924cf7bdb9830bb781de9ca095c61 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9ad4c0468f1924cf7bdb9830bb781de9ca095c61 commit 9ad4c0468f1924cf7bdb9830bb781de9ca095c61 Author: Warner Losh AuthorDate: 2023-02-16 16:36:03 +0000 Commit: Warner Losh CommitDate: 2023-02-19 00:46:57 +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 (cherry picked from commit ccf2121d59ac51e1a0287d75262d48018d09cad6) --- 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);