1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:07:47 +00:00

AK+Kernel: Implement UUID mixed endianness support

This is being used by GUID partitions so the first three dash-delimited
fields of the GUID are stored in little endian order but the last two
fields are stored in big endian order, hence it's a representation which
is mixed.
This commit is contained in:
Liav A 2022-01-28 20:21:40 +02:00 committed by Idan Horowitz
parent 2d67d141e6
commit 308e54bc19
3 changed files with 47 additions and 6 deletions

View file

@ -219,7 +219,7 @@ UNMAP_AFTER_INIT void StorageManagement::determine_boot_device_with_partition_uu
VERIFY(!m_storage_devices.is_empty());
VERIFY(m_boot_argument.starts_with(partition_uuid_prefix));
auto partition_uuid = UUID(m_boot_argument.substring_view(partition_uuid_prefix.length()));
auto partition_uuid = UUID(m_boot_argument.substring_view(partition_uuid_prefix.length()), UUID::Endianness::Mixed);
if (partition_uuid.to_string().length() != 36) {
// FIXME: It would be helpful to output the specified and detected UUIDs in this case,