From 357365624447e3a5a4b36f15a9ddabb01e7f2392 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 21 Nov 2024 20:39:27 +0200 Subject: [PATCH] Kernel: Make PARTUUID matching case insensitive Case sensitivity made it super annoying to work with :) --- kernel/kernel/FS/VirtualFileSystem.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel/kernel/FS/VirtualFileSystem.cpp b/kernel/kernel/FS/VirtualFileSystem.cpp index d90b5e1f7d..04231dbaf8 100644 --- a/kernel/kernel/FS/VirtualFileSystem.cpp +++ b/kernel/kernel/FS/VirtualFileSystem.cpp @@ -8,6 +8,7 @@ #include #include +#include #include namespace Kernel @@ -28,8 +29,10 @@ namespace Kernel if (!static_cast(inode.ptr())->is_partition()) return BAN::Iteration::Continue; auto* partition = static_cast(inode.ptr()); - if (partition->uuid() != uuid) - return BAN::Iteration::Continue; + ASSERT(partition->uuid().size() == uuid.size()); + for (size_t i = 0; i < uuid.size(); i++) + if (tolower(uuid[i]) != tolower(partition->uuid()[i])) + return BAN::Iteration::Continue; result = partition; return BAN::Iteration::Break; }