1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:17:46 +00:00

Kernel: Convert Mount::absolute_path to ErrorOr<NonnullOwnPtr<KString>>

This commit is contained in:
Idan Horowitz 2022-01-11 21:26:32 +02:00
parent 6be2a51b10
commit 4e7d307166
3 changed files with 10 additions and 5 deletions

View file

@ -27,11 +27,11 @@ Mount::Mount(Inode& source, Custody& host_custody, int flags)
{
}
String Mount::absolute_path() const
ErrorOr<NonnullOwnPtr<KString>> Mount::absolute_path() const
{
if (!m_host_custody)
return "/";
return m_host_custody->absolute_path();
return KString::try_create("/"sv);
return m_host_custody->try_serialize_absolute_path();
}
Inode* Mount::host()

View file

@ -26,7 +26,7 @@ public:
FileSystem const& guest_fs() const { return *m_guest_fs; }
FileSystem& guest_fs() { return *m_guest_fs; }
String absolute_path() const;
ErrorOr<NonnullOwnPtr<KString>> absolute_path() const;
int flags() const { return m_flags; }
void set_flags(int flags) { m_flags = flags; }