diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-06 10:42:09 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-06 13:06:05 +0200 |
commit | efe4e230ee60b16356359220d749b96c65a4ed6f (patch) | |
tree | 5b6c35489f3627ecbab835aa4ec42c9918819591 /Kernel/FileSystem/DevPtsFS.h | |
parent | cbc4c98a87f8fbc01626957402596f45ab91b725 (diff) | |
download | serenity-efe4e230ee60b16356359220d749b96c65a4ed6f.zip |
Kernel: Tidy up DevPtsFS construction and handle OOM errors
- Use KResultOr and TRY() to propagate errors
- Check for OOM when creating new inodes
Diffstat (limited to 'Kernel/FileSystem/DevPtsFS.h')
-rw-r--r-- | Kernel/FileSystem/DevPtsFS.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/FileSystem/DevPtsFS.h b/Kernel/FileSystem/DevPtsFS.h index 801e42f699..af2549a222 100644 --- a/Kernel/FileSystem/DevPtsFS.h +++ b/Kernel/FileSystem/DevPtsFS.h @@ -20,7 +20,7 @@ class DevPtsFS final : public FileSystem { public: virtual ~DevPtsFS() override; - static NonnullRefPtr<DevPtsFS> create(); + static KResultOr<NonnullRefPtr<DevPtsFS>> try_create(); virtual KResult initialize() override; virtual StringView class_name() const override { return "DevPtsFS"sv; } |