Kernel: Process gets absolute paths for mount

This commit is contained in:
Bananymous 2023-04-01 00:22:46 +03:00
parent 5da801d12b
commit 990887891e
2 changed files with 4 additions and 1 deletions

View File

@ -9,6 +9,7 @@ namespace Kernel
class FileSystem
{
public:
virtual ~FileSystem() {}
virtual BAN::RefPtr<Inode> root_inode() = 0;
};

View File

@ -106,7 +106,9 @@ namespace Kernel
BAN::ErrorOr<void> 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 {};
}