efi_guid struct gets equals, simplify EFI acpi_init
Change-Id: Id4bc985dc1e6f44b594f6ca5dabd3fdac8e1cac2 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3545 Reviewed-by: Alex von Gluck IV <[email protected]>
This commit is contained in:
committed by
Alex von Gluck IV
parent
e050005a07
commit
da93a24811
@@ -82,6 +82,14 @@ typedef struct efi_guid {
|
||||
uint16_t data2;
|
||||
uint16_t data3;
|
||||
uint8_t data4[8];
|
||||
|
||||
bool equals(const efi_guid& other) const {
|
||||
bool matches = data1 == other.data1 && data2 == other.data2
|
||||
&& data3 == other.data3;
|
||||
for (auto i = 0; matches && i < 8; i++)
|
||||
matches = data4[i] == other.data4[i];
|
||||
return matches;
|
||||
}
|
||||
} efi_guid;
|
||||
|
||||
typedef void* efi_handle;
|
||||
|
||||
Reference in New Issue
Block a user