1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:57:44 +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

View file

@ -10,7 +10,7 @@ SlavePTY::SlavePTY(MasterPTY& master, unsigned index)
{
set_uid(current->uid());
set_gid(current->gid());
VFS::the().register_character_device(*this);
VFS::the().register_device(*this);
DevPtsFS::the().register_slave_pty(*this);
set_size(80, 25);
}
@ -19,7 +19,7 @@ SlavePTY::~SlavePTY()
{
dbgprintf("~SlavePTY(%u)\n", m_index);
DevPtsFS::the().unregister_slave_pty(*this);
VFS::the().unregister_character_device(*this);
VFS::the().unregister_device(*this);
}
String SlavePTY::tty_name() const