From 8b5d8d9f8ad14d7e0631d18e7141d1ff8525e979 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sat, 1 Apr 2023 00:22:46 +0300 Subject: [PATCH] Kernel: Process gets absolute paths for mount --- kernel/include/kernel/FS/FileSystem.h | 1 + kernel/kernel/Process.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/include/kernel/FS/FileSystem.h b/kernel/include/kernel/FS/FileSystem.h index 9435870a..673d596c 100644 --- a/kernel/include/kernel/FS/FileSystem.h +++ b/kernel/include/kernel/FS/FileSystem.h @@ -9,6 +9,7 @@ namespace Kernel class FileSystem { public: + virtual ~FileSystem() {} virtual BAN::RefPtr root_inode() = 0; }; diff --git a/kernel/kernel/Process.cpp b/kernel/kernel/Process.cpp index 9d580a14..9325768a 100644 --- a/kernel/kernel/Process.cpp +++ b/kernel/kernel/Process.cpp @@ -106,7 +106,9 @@ namespace Kernel BAN::ErrorOr Process::mount(BAN::StringView partition, BAN::StringView path) { - TRY(VirtualFileSystem::get().mount(partition, path)); + auto absolute_partition = TRY(absolute_path_of(partition)); + auto absolute_path = TRY(absolute_path_of(path)); + TRY(VirtualFileSystem::get().mount(absolute_partition, absolute_path)); return {}; }