mirror of
https://github.com/RGBCube/serenity
synced 2025-07-07 09:27:35 +00:00
Kernel: Have devices automagically register themselves with the VFS.
This commit is contained in:
parent
e74c833af3
commit
b6bf26430d
4 changed files with 11 additions and 24 deletions
|
@ -1,8 +1,16 @@
|
|||
#include "CharacterDevice.h"
|
||||
#include <LibC/errno_numbers.h>
|
||||
|
||||
Device::Device(unsigned major, unsigned minor)
|
||||
: m_major(major)
|
||||
, m_minor(minor)
|
||||
{
|
||||
VFS::the().register_device(*this);
|
||||
}
|
||||
|
||||
Device::~Device()
|
||||
{
|
||||
VFS::the().unregister_device(*this);
|
||||
}
|
||||
|
||||
RetainPtr<FileDescriptor> Device::open(int& error, int options)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue