Kernel/Devices: Add two protected methods for DeviceManagement functions

These methods are essentially splitted from the after_inserting method
and the will_be_destroyed method so later on we can allow Storage
devices to override the after_inserting method and the will_be_destroyed
method while still being able to use shared functionality as before,
such as adding the device to and removing it from the device list.
This commit is contained in:
Liav A 2022-04-23 11:19:02 +03:00 committed by Andreas Kling
commit 22335e53e0
Notes: sideshowbarker 2024-07-17 08:55:54 +09:00
2 changed files with 16 additions and 3 deletions

View file

@ -68,6 +68,9 @@ protected:
void set_uid(UserID uid) { m_uid = uid; }
void set_gid(GroupID gid) { m_gid = gid; }
void after_inserting_add_to_device_management();
void before_will_be_destroyed_remove_from_device_management();
private:
MajorNumber const m_major { 0 };
MinorNumber const m_minor { 0 };