diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-02-25 20:47:56 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-02-25 20:50:22 +0100 |
commit | 5af4e622b94a194e3feaea1b3b09229d7a93578b (patch) | |
tree | 1d814ef3b92989e464e4409dfabfed9324c00773 /Kernel/ProcFS.h | |
parent | 901b7d5d91b3eacda12dad01211b84a28e1a39a6 (diff) | |
download | serenity-5af4e622b94a194e3feaea1b3b09229d7a93578b.zip |
Kernel: Add KResult and KResultOr<T> classes.
The idea here is to combine a potential syscall error code with an arbitrary
type in the case of success. I feel like this will end up much less error
prone than returning some arbitrary type that kinda sorta has bool semantics
(but sometimes not really) and passing the error through an out-param.
This patch only converts a few syscalls to using it. More to come.
Diffstat (limited to 'Kernel/ProcFS.h')
-rw-r--r-- | Kernel/ProcFS.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/ProcFS.h b/Kernel/ProcFS.h index ad64feae41..f2b0e0a0e0 100644 --- a/Kernel/ProcFS.h +++ b/Kernel/ProcFS.h @@ -87,7 +87,7 @@ private: virtual bool remove_child(const String& name, int& error) override; virtual RetainPtr<Inode> parent() const override; virtual size_t directory_entry_count() const override; - virtual bool chmod(mode_t, int& error) override; + virtual KResult chmod(mode_t) override; ProcFS& fs() { return static_cast<ProcFS&>(Inode::fs()); } const ProcFS& fs() const { return static_cast<const ProcFS&>(Inode::fs()); } |