1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:17:45 +00:00

Kernel: Add DeviceManagement::try_for_each() for fallible iteration

This API will allow users to short circuit iteration and properly
propagate errors.
This commit is contained in:
Idan Horowitz 2022-02-24 20:03:26 +02:00 committed by Andreas Kling
parent 064b93c2ad
commit da5d678f2a
2 changed files with 10 additions and 0 deletions

View file

@ -44,6 +44,7 @@ public:
void before_device_removal(Badge<Device>, Device&);
void for_each(Function<void(Device&)>);
ErrorOr<void> try_for_each(Function<ErrorOr<void>(Device&)>);
Device* get_device(MajorNumber major, MinorNumber minor);
NullDevice const& null_device() const;