1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-03 05:22:08 +00:00

Kernel/Devices: Use try_create_device helper for ConsoleDevice

This commit is contained in:
Liav A 2021-09-16 22:23:25 +03:00 committed by Idan Horowitz
parent 5e8dcb9ca7
commit fd4397a430
8 changed files with 43 additions and 26 deletions

View file

@ -559,8 +559,9 @@ private:
ProcFSDmesg();
virtual KResult try_generate(KBufferBuilder& builder) override
{
VERIFY(DeviceManagement::the().is_console_device_attached());
InterruptDisabler disabler;
for (char ch : ConsoleDevice::the().logbuffer()) {
for (char ch : DeviceManagement::the().console_device().logbuffer()) {
TRY(builder.append(ch));
}
return KSuccess;