diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-08 11:58:28 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-08 11:58:28 +0100 |
commit | 42d41fdf947956af0dcbab46dbd316a38e7f6199 (patch) | |
tree | 3b7b763b11fd87bf263d169604977713c3cc4d00 /Kernel/FileSystem/FileSystem.h | |
parent | 2f82d4fb31af551deeb7955073d0f6bf69b33d2a (diff) | |
download | serenity-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.h | 2 |
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; |