Date: Thu, 1 May 2025 18:06:36 GMT From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 5f2dd25a9e71 - main - efivar: Test uuid against zero Message-ID: <202505011806.541I6avV066494@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5f2dd25a9e718f8d317c249e813818edbee08b22 commit 5f2dd25a9e718f8d317c249e813818edbee08b22 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2025-05-01 17:53:05 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2025-05-01 17:53:05 +0000 efivar: Test uuid against zero Test the passed in GuID against a guid of all 0's. This removes another place that has to worry about the difference between uuit_t and EFI_GUID. Sponsored by: Netflix Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D50034 --- lib/libefivar/efivar.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/libefivar/efivar.c b/lib/libefivar/efivar.c index a74deeae1e03..0089ed608a6f 100644 --- a/lib/libefivar/efivar.c +++ b/lib/libefivar/efivar.c @@ -77,7 +77,6 @@ static struct uuid_table guid_tbl [] = { "f46ee6f4-4785-43a3-923d-7f786c3c8479", "lenovo_startup_interrupt", Z }, { "ffffffff-ffff-ffff-ffff-ffffffffffff", "zzignore-this-guid", Z }, }; -#undef Z static void efi_guid_tbl_compile(void) @@ -293,9 +292,7 @@ efi_guid_cmp(const efi_guid_t *guid1, const efi_guid_t *guid2) int efi_guid_is_zero(const efi_guid_t *guid) { - uint32_t status; - - return uuid_is_nil((const uuid_t *)guid, &status); + return (memcmp(guid, &efi_guid_empty, sizeof(*guid)) == 0); } int
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202505011806.541I6avV066494>