mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
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.
This commit is contained in:
@@ -41,7 +41,7 @@ private:
|
||||
virtual int increment_link_count() override;
|
||||
virtual int decrement_link_count() override;
|
||||
virtual size_t directory_entry_count() const override;
|
||||
virtual bool chmod(mode_t, int& error) override;
|
||||
virtual KResult chmod(mode_t) override;
|
||||
|
||||
void populate_lookup_cache() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user