1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:37:35 +00:00

Kernel: Add Device base class for CharacterDevice.

..to prepare for adding a BlockDevice class.
This commit is contained in:
Andreas Kling 2019-02-16 00:47:20 +01:00
parent c6ca6522fc
commit 994279d56c
11 changed files with 113 additions and 94 deletions

20
Kernel/Device.cpp Normal file
View file

@ -0,0 +1,20 @@
#include "CharacterDevice.h"
#include <LibC/errno_numbers.h>
Device::~Device()
{
}
RetainPtr<FileDescriptor> Device::open(int& error, int options)
{
return VFS::the().open(*this, error, options);
}
void Device::close()
{
}
int Device::ioctl(Process&, unsigned, unsigned)
{
return -ENOTTY;
}