mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:58:12 +00:00
Kernel/Devices: Use try_create_device helper for ConsoleDevice
This commit is contained in:
parent
5e8dcb9ca7
commit
fd4397a430
8 changed files with 43 additions and 26 deletions
|
@ -22,6 +22,12 @@ UNMAP_AFTER_INIT void DeviceManagement::initialize()
|
|||
s_the.ensure_instance();
|
||||
}
|
||||
|
||||
|
||||
UNMAP_AFTER_INIT void DeviceManagement::attach_console_device(ConsoleDevice const& device)
|
||||
{
|
||||
m_console_device = device;
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT void DeviceManagement::attach_null_device(NullDevice const& device)
|
||||
{
|
||||
m_null_device = device;
|
||||
|
@ -85,4 +91,13 @@ NullDevice const& DeviceManagement::null_device() const
|
|||
return *m_null_device;
|
||||
}
|
||||
|
||||
ConsoleDevice const& DeviceManagement::console_device() const
|
||||
{
|
||||
return *m_console_device;
|
||||
}
|
||||
ConsoleDevice& DeviceManagement::console_device()
|
||||
{
|
||||
return *m_console_device;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue