1
Fork 0
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:
Andreas Kling 2019-04-03 12:36:40 +02:00
parent 072ea7eece
commit ab43658c55
42 changed files with 53 additions and 54 deletions

28
Kernel/Devices/Device.cpp Normal file
View 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;
}