mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:48:11 +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
|
@ -8,6 +8,7 @@
|
|||
#include <AK/StringView.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/Devices/ConsoleDevice.h>
|
||||
#include <Kernel/Devices/DeviceManagement.h>
|
||||
#include <Kernel/Devices/PCISerialDevice.h>
|
||||
#include <Kernel/Graphics/GraphicsManagement.h>
|
||||
#include <Kernel/IO.h>
|
||||
|
@ -87,8 +88,8 @@ static void console_out(char ch)
|
|||
|
||||
// It would be bad to reach the assert in ConsoleDevice()::the() and do a stack overflow
|
||||
|
||||
if (ConsoleDevice::is_initialized()) {
|
||||
ConsoleDevice::the().put_char(ch);
|
||||
if (DeviceManagement::the().is_console_device_attached()) {
|
||||
DeviceManagement::the().console_device().put_char(ch);
|
||||
} else {
|
||||
IO::out8(IO::BOCHS_DEBUG_PORT, ch);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue