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:
Fredrik Holmqvist
2020-12-22 22:12:13 +00:00
committed by Alex von Gluck IV
parent e050005a07
commit da93a24811
2 changed files with 16 additions and 14 deletions
@@ -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;