mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 23:38:12 +00:00
Kernel: Move devices into Kernel/Devices/.
This commit is contained in:
parent
072ea7eece
commit
ab43658c55
42 changed files with 53 additions and 54 deletions
28
Kernel/Devices/Device.cpp
Normal file
28
Kernel/Devices/Device.cpp
Normal file
|
@ -0,0 +1,28 @@
|
|||
#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);
|
||||
}
|
||||
|
||||
KResultOr<Retained<FileDescriptor>> Device::open(int options)
|
||||
{
|
||||
return VFS::the().open(*this, options);
|
||||
}
|
||||
|
||||
void Device::close()
|
||||
{
|
||||
}
|
||||
|
||||
int Device::ioctl(Process&, unsigned, unsigned)
|
||||
{
|
||||
return -ENOTTY;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue