Date: Thu, 20 Feb 2025 20:16:12 GMT From: Jose Luis Duran <jlduran@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 39d58c816068 - main - libefivar: Add Display Only format for Hard Drive Message-ID: <202502202016.51KKGCKL031105@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=39d58c816068178515af0718c47f4f64d1cffc1d commit 39d58c816068178515af0718c47f4f64d1cffc1d Author: Jose Luis Duran <jlduran@FreeBSD.org> AuthorDate: 2025-02-20 20:10:44 +0000 Commit: Jose Luis Duran <jlduran@FreeBSD.org> CommitDate: 2025-02-20 20:14:26 +0000 libefivar: Add Display Only format for Hard Drive Ref: UEFI Specification Version 2.1 (Errata D) (released October 2008) Reviewed by: imp, emaste Approved by: emaste (mentor) Obtained from: https://github.com/tianocore/edk2/commit/9e6537469d4700d9d793ee21e9c2f2e7ddbb2176 Differential Revision: https://reviews.freebsd.org/D49060 --- lib/libefivar/efivar-dp-format.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/libefivar/efivar-dp-format.c b/lib/libefivar/efivar-dp-format.c index b4300573e41c..3fa2833a7e7a 100644 --- a/lib/libefivar/efivar-dp-format.c +++ b/lib/libefivar/efivar-dp-format.c @@ -1944,7 +1944,7 @@ DevPathToTextHardDrive ( case SIGNATURE_TYPE_MBR: UefiDevicePathLibCatPrint ( Str, - "HD(%d,%s,0x%08x,", + "HD(%d,%s,0x%08x", Hd->PartitionNumber, "MBR", // *((UINT32 *)(&(Hd->Signature[0]))) @@ -1955,7 +1955,7 @@ DevPathToTextHardDrive ( case SIGNATURE_TYPE_GUID: UefiDevicePathLibCatPrint ( Str, - "HD(%d,%s,%36s,", + "HD(%d,%s,%36s", Hd->PartitionNumber, "GPT", G(&(Hd->Signature[0])) @@ -1965,14 +1965,18 @@ DevPathToTextHardDrive ( default: UefiDevicePathLibCatPrint ( Str, - "HD(%d,%d,0,", + "HD(%d,%d,0", Hd->PartitionNumber, Hd->SignatureType ); break; } - UefiDevicePathLibCatPrint (Str, "0x%lx,0x%lx)", Hd->PartitionStart, Hd->PartitionSize); + if (DisplayOnly) { + UefiDevicePathLibCatPrint (Str, ")"); + } else { + UefiDevicePathLibCatPrint (Str, ",0x%lx,0x%lx)", Hd->PartitionStart, Hd->PartitionSize); + } } /**
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502202016.51KKGCKL031105>