summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/Plan9FileSystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/FileSystem/Plan9FileSystem.cpp')
-rw-r--r--Kernel/FileSystem/Plan9FileSystem.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/Kernel/FileSystem/Plan9FileSystem.cpp b/Kernel/FileSystem/Plan9FileSystem.cpp
index 657ba67a5e..163e69d6bd 100644
--- a/Kernel/FileSystem/Plan9FileSystem.cpp
+++ b/Kernel/FileSystem/Plan9FileSystem.cpp
@@ -195,7 +195,7 @@ private:
bool m_have_been_built { false };
};
-bool Plan9FS::initialize()
+KResult Plan9FS::initialize()
{
ensure_thread();
@@ -204,7 +204,7 @@ bool Plan9FS::initialize()
auto result = post_message_and_wait_for_a_reply(version_message);
if (result.is_error())
- return false;
+ return result;
u32 msize;
StringView remote_protocol_version;
@@ -227,11 +227,13 @@ bool Plan9FS::initialize()
result = post_message_and_wait_for_a_reply(attach_message);
if (result.is_error()) {
dbgln("Attaching failed");
- return false;
+ return result;
}
m_root_inode = Plan9FSInode::create(*this, root_fid);
- return true;
+ if (!m_root_inode)
+ return ENOMEM;
+ return KSuccess;
}
Plan9FS::ProtocolVersion Plan9FS::parse_protocol_version(const StringView& s) const