From 5a5766be2c2edb7d130d650a0c3e8707b9d57410 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Tue, 15 Feb 2022 20:54:13 +0200 Subject: [PATCH] Kernel: Remove useless partition UUID length check UUID::to_string() always returns a string of length 36, so this check can't fail. --- Kernel/Storage/StorageManagement.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Kernel/Storage/StorageManagement.cpp b/Kernel/Storage/StorageManagement.cpp index f30f6a5a19..02de8e055c 100644 --- a/Kernel/Storage/StorageManagement.cpp +++ b/Kernel/Storage/StorageManagement.cpp @@ -222,12 +222,6 @@ UNMAP_AFTER_INIT void StorageManagement::determine_boot_device_with_partition_uu 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, - // but we never actually enter this path - if the length doesn't match, the UUID - // constructor above crashes with a VERIFY in convert_string_view_to_uuid(). - PANIC("StorageManagement: Specified partition UUID is not valid"); - } for (auto& storage_device : m_storage_devices) { for (auto& partition : storage_device.partitions()) { if (partition.metadata().unique_guid().is_zero())