mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:27:35 +00:00
LibC: Implement tcflush(3)
This commit is contained in:
parent
f4ddca0a73
commit
7a27fa3df8
3 changed files with 11 additions and 3 deletions
|
@ -329,6 +329,14 @@ int TTY::ioctl(FileDescription&, unsigned request, FlatPtr arg)
|
|||
if (request == TCSETSF)
|
||||
flush_input();
|
||||
return 0;
|
||||
case TCFLSH:
|
||||
// Serenity's TTY implementation does not use an output buffer, so ignore TCOFLUSH.
|
||||
if (arg == TCIFLUSH || arg == TCIOFLUSH) {
|
||||
flush_input();
|
||||
} else if (arg != TCOFLUSH) {
|
||||
return -EINVAL;
|
||||
}
|
||||
return 0;
|
||||
case TIOCGWINSZ:
|
||||
ws = reinterpret_cast<winsize*>(arg);
|
||||
if (!current_process.validate_write(ws, sizeof(winsize)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue