summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/FileSystem.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-02-08 11:58:28 +0100
committerAndreas Kling <kling@serenityos.org>2020-02-08 11:58:28 +0100
commit42d41fdf947956af0dcbab46dbd316a38e7f6199 (patch)
tree3b7b763b11fd87bf263d169604977713c3cc4d00 /Kernel/FileSystem/FileSystem.h
parent2f82d4fb31af551deeb7955073d0f6bf69b33d2a (diff)
downloadserenity-42d41fdf947956af0dcbab46dbd316a38e7f6199.zip
Kernel: Simplify FS::create_inode() a little bit
Return a KResultOr<NonnullRefPtr<Inode>> instead of returning errors in an out-parameter.
Diffstat (limited to 'Kernel/FileSystem/FileSystem.h')
-rw-r--r--Kernel/FileSystem/FileSystem.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/FileSystem/FileSystem.h b/Kernel/FileSystem/FileSystem.h
index 7f9f6628d4..76ba9ea737 100644
--- a/Kernel/FileSystem/FileSystem.h
+++ b/Kernel/FileSystem/FileSystem.h
@@ -84,7 +84,7 @@ public:
u8 file_type { 0 };
};
- virtual RefPtr<Inode> create_inode(InodeIdentifier parent_inode, const String& name, mode_t, off_t size, dev_t, uid_t, gid_t, int& error) = 0;
+ virtual KResultOr<NonnullRefPtr<Inode>> create_inode(InodeIdentifier parent_id, const String& name, mode_t, off_t size, dev_t, uid_t, gid_t) = 0;
virtual KResult create_directory(InodeIdentifier parent_inode, const String& name, mode_t, uid_t, gid_t) = 0;
virtual RefPtr<Inode> get_inode(InodeIdentifier) const = 0;