Skip to content

Commit e7e4c7b

Browse files
committed
Remove gnu-efi CompareGuid fixup
gnu-efi and EDK2 have the same default CompareGuid since ncroxon/gnu-efi@a093fe0 which is included in the version of gnu-efi included with uefi-ntfs post 963f02b Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
1 parent 963f02b commit e7e4c7b

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

boot.h

-11
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,6 @@
116116
#define P_ASSERT(f, l, a) if(!(a)) do { Print(L"*** ASSERT FAILED: %a(%d): %a ***\n", f, l, #a); while(1); } while(0)
117117
#define V_ASSERT(a) P_ASSERT(__FILE__, __LINE__, a)
118118

119-
/*
120-
* EDK2 and gnu-efi's CompareGuid() return opposite values for a match!
121-
* EDK2 returns boolean TRUE, whereas gnu-efi returns INTN 0, so we
122-
* define a common boolean macro that follows EDK2 convention always.
123-
*/
124-
#if defined(_GNU_EFI)
125-
#define COMPARE_GUID(a, b) (CompareGuid(a, b) == 0)
126-
#else
127-
#define COMPARE_GUID CompareGuid
128-
#endif
129-
130119
/*
131120
* Secure string length, that asserts if the string is NULL or if
132121
* the length is larger than a predetermined value (STRING_MAX)

system.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ static EFI_STATUS GetSystemConfigurationTable(EFI_GUID* TableGuid, VOID** Table)
2828
V_ASSERT(Table != NULL);
2929

3030
for (Index = 0; Index < gST->NumberOfTableEntries; Index++) {
31-
if (COMPARE_GUID(TableGuid, &(gST->ConfigurationTable[Index].VendorGuid))) {
31+
if (CompareGuid(TableGuid, &(gST->ConfigurationTable[Index].VendorGuid))) {
3232
*Table = gST->ConfigurationTable[Index].VendorTable;
3333
return EFI_SUCCESS;
3434
}

0 commit comments

Comments
 (0)