Kernel: Add some functionality to disable TTY input/output

Userspace programs can call tty_ctrl() to disable/enable tty from
handling input and displaying output.

This API is probably going to change in the future to ioctl calls
but I'm not sure how ioctl is used and what functionality should it
have. I decided to create whole new function and syscall for now.

Next I will expose framebuffer in /dev/fb0 and then I can start work
on graphical environment! :D
This commit is contained in:
Bananymous
2023-09-27 15:44:05 +03:00
parent 459afef89e
commit cb76f1ea75
13 changed files with 108 additions and 5 deletions

8
libc/sys/banan-os.cpp Normal file
View File

@@ -0,0 +1,8 @@
#include <sys/banan-os.h>
#include <sys/syscall.h>
#include <unistd.h>
int tty_ctrl(int fildes, int command, int flags)
{
return syscall(SYS_TTY_CTRL, fildes, command, flags);
}