mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
Kernel+LibC: Turn errno codes into a strongly typed enum
..and allow implicit creation of KResult and KResultOr from ErrnoCode. This means that kernel functions that return those types can finally do "return EINVAL;" and it will just work. There's a handful of functions that still deal with signed integers that should be converted to return KResults.
This commit is contained in:
parent
e279b45aed
commit
19d3f8cab7
48 changed files with 591 additions and 506 deletions
|
@ -139,8 +139,8 @@ private:
|
|||
virtual KResult add_child(Inode&, const StringView& name, mode_t) override;
|
||||
virtual KResult remove_child(const StringView& name) override;
|
||||
virtual KResultOr<size_t> directory_entry_count() const override;
|
||||
virtual KResult chmod(mode_t) override { return KResult(-EINVAL); }
|
||||
virtual KResult chown(uid_t, gid_t) override { return KResult(-EINVAL); }
|
||||
virtual KResult chmod(mode_t) override { return EINVAL; }
|
||||
virtual KResult chown(uid_t, gid_t) override { return EINVAL; }
|
||||
virtual KResultOr<NonnullRefPtr<Custody>> resolve_as_link(Custody&, RefPtr<Custody>*, int, int) const override { ASSERT_NOT_REACHED(); }
|
||||
virtual FileDescription* preopen_fd() override { return m_fd; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue