All checks were successful
continuous-integration/drone/push Build is passing
Still allow printing text to the console, but without text input or ANSI escape fancy stuff.
31 lines
788 B
C++
31 lines
788 B
C++
#include "fs/devices/ConsoleDevice.h"
|
|
#include "Log.h"
|
|
#include "Pledge.h"
|
|
#include "fs/devices/DeviceRegistry.h"
|
|
#include "fs/devices/KeyboardDevice.h"
|
|
#include "memory/MemoryManager.h"
|
|
#include "thread/Scheduler.h"
|
|
#include "video/TextConsole.h"
|
|
#include <bits/ioctl-defs.h>
|
|
#include <luna/CString.h>
|
|
#include <luna/CType.h>
|
|
#include <luna/Units.h>
|
|
#include <luna/Vector.h>
|
|
|
|
Result<void> ConsoleDevice::create()
|
|
{
|
|
auto device = TRY(make_shared<ConsoleDevice>());
|
|
return DeviceRegistry::register_special_device(DeviceRegistry::Console, 0, device, 0200);
|
|
}
|
|
|
|
Result<usize> ConsoleDevice::read(u8*, usize, usize) const
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
Result<usize> ConsoleDevice::write(const u8* buf, usize, usize length)
|
|
{
|
|
TextConsole::write((const char*)buf, length);
|
|
return length;
|
|
}
|