1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 23:14:59 +00:00

FileSystem: Get rid of VFS::absolute_path() and teach Mount about custodies.

This commit is contained in:
Andreas Kling 2019-05-30 21:29:26 +02:00
parent 8e83aac8a3
commit 874bffc729
6 changed files with 40 additions and 97 deletions

View file

@ -41,12 +41,11 @@ KResultOr<Region*> InodeFile::mmap(Process& process, LinearAddress preferred_lad
return region;
}
String InodeFile::absolute_path(FileDescriptor&) const
String InodeFile::absolute_path(FileDescriptor& descriptor) const
{
auto path_or_error = VFS::the().absolute_path(const_cast<Inode&>(inode()));
if (path_or_error.is_error())
return { };
return path_or_error.value();
ASSERT_NOT_REACHED();
ASSERT(descriptor.custody());
return descriptor.absolute_path();
}
KResult InodeFile::truncate(off_t size)