From nobody Tue Nov 02 23:09:40 2021 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 D16381842CEE; Tue, 2 Nov 2021 23:09:40 +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 4HkQb85Z46z4lL8; Tue, 2 Nov 2021 23:09:40 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 9068B5DC8; Tue, 2 Nov 2021 23:09:40 +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 1A2N9ebv025568; Tue, 2 Nov 2021 23:09:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1A2N9efq025567; Tue, 2 Nov 2021 23:09:40 GMT (envelope-from git) Date: Tue, 2 Nov 2021 23:09:40 GMT Message-Id: <202111022309.1A2N9efq025567@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: e3ab141fda6a - main - gpart: Move GPT efimedia reporting to a separate routine 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: e3ab141fda6a999d6fcdf050e07174199eea5557 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e3ab141fda6a999d6fcdf050e07174199eea5557 commit e3ab141fda6a999d6fcdf050e07174199eea5557 Author: Warner Losh AuthorDate: 2021-11-02 23:08:37 +0000 Commit: Warner Losh CommitDate: 2021-11-02 23:09:17 +0000 gpart: Move GPT efimedia reporting to a separate routine Move the efimedia reporting to g_part_gpt_efimedia and use that from g_part_gpt_dumpconf to report it. Sponsored by: Netflix Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D32780 --- sys/geom/part/g_part_gpt.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sys/geom/part/g_part_gpt.c b/sys/geom/part/g_part_gpt.c index 89a92977dff6..1f6d3dff249d 100644 --- a/sys/geom/part/g_part_gpt.c +++ b/sys/geom/part/g_part_gpt.c @@ -734,6 +734,15 @@ g_part_gpt_destroy(struct g_part_table *basetable, struct g_part_parms *gpp) return (0); } +static void +g_part_gpt_efimedia(struct g_part_gpt_entry *entry, struct sbuf *sb) +{ + sbuf_printf(sb, "HD(%d,GPT,", entry->base.gpe_index); + sbuf_printf_uuid(sb, &entry->ent.ent_uuid); + sbuf_printf(sb, ",%#jx,%#jx)", (intmax_t)entry->base.gpe_start, + (intmax_t)(entry->base.gpe_end - entry->base.gpe_start + 1)); +} + static void g_part_gpt_dumpconf(struct g_part_table *table, struct g_part_entry *baseentry, struct sbuf *sb, const char *indent) @@ -768,10 +777,7 @@ g_part_gpt_dumpconf(struct g_part_table *table, struct g_part_entry *baseentry, sbuf_printf_uuid(sb, &entry->ent.ent_uuid); sbuf_cat(sb, "\n"); sbuf_printf(sb, "%s", indent); - sbuf_printf(sb, "HD(%d,GPT,", entry->base.gpe_index); - sbuf_printf_uuid(sb, &entry->ent.ent_uuid); - sbuf_printf(sb, ",%#jx,%#jx)", (intmax_t)entry->base.gpe_start, - (intmax_t)(entry->base.gpe_end - entry->base.gpe_start + 1)); + g_part_gpt_efimedia(entry, sb); sbuf_cat(sb, "\n"); } else { /* confxml: scheme information */