Kernel: TTY doesn't panic if it doesn't find input device
This commit is contained in:
parent
e01928d186
commit
792bb2df1c
|
@ -81,7 +81,14 @@ namespace Kernel
|
||||||
Process::create_kernel(
|
Process::create_kernel(
|
||||||
[](void*)
|
[](void*)
|
||||||
{
|
{
|
||||||
auto inode = MUST(VirtualFileSystem::get().file_from_absolute_path({ 0, 0, 0, 0 }, "/dev/input0"sv, O_RDONLY)).inode;
|
auto file_or_error = VirtualFileSystem::get().file_from_absolute_path({ 0, 0, 0, 0 }, "/dev/input0"sv, O_RDONLY);
|
||||||
|
if (file_or_error.is_error())
|
||||||
|
{
|
||||||
|
dprintln("no input device found");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto inode = file_or_error.value().inode;
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
while (!TTY::current()->m_tty_ctrl.receive_input)
|
while (!TTY::current()->m_tty_ctrl.receive_input)
|
||||||
|
|
Loading…
Reference in New Issue