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:
parent
8e83aac8a3
commit
874bffc729
6 changed files with 40 additions and 97 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue