1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:57:44 +00:00

Kernel: Tidy up DevPtsFS construction and handle OOM errors

- Use KResultOr and TRY() to propagate errors
- Check for OOM when creating new inodes
This commit is contained in:
Andreas Kling 2021-09-06 10:42:09 +02:00
parent cbc4c98a87
commit efe4e230ee
3 changed files with 6 additions and 11 deletions

View file

@ -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; }