Kernel: Declare Device major and minor data member numbers as const

This is just another "safety guard" to ensure these numbers don't ever
change after being set for a certain Device at construction time.
This commit is contained in:
Liav A 2022-03-31 23:57:25 +03:00 committed by Linus Groh
parent 7334636933
commit 231b9f256b
Notes: sideshowbarker 2024-07-17 17:49:11 +09:00

View file

@ -68,8 +68,8 @@ protected:
void set_gid(GroupID gid) { m_gid = gid; }
private:
MajorNumber m_major { 0 };
MinorNumber m_minor { 0 };
MajorNumber const m_major { 0 };
MinorNumber const m_minor { 0 };
UserID m_uid { 0 };
GroupID m_gid { 0 };