mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-24 09:53:24 +00:00
Support TCSETSW and TCSETSF for ioctl
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
3eab9cea6e
commit
0018ac4d63
@ -114,6 +114,21 @@ impl Device for Tty {
|
||||
self.ldisc.set_termios(termios);
|
||||
Ok(0)
|
||||
}
|
||||
IoctlCmd::TCSETSW => {
|
||||
let termios = read_val_from_user(arg)?;
|
||||
debug!("set termios = {:?}", termios);
|
||||
self.ldisc.set_termios(termios);
|
||||
// TODO: drain output buffer
|
||||
Ok(0)
|
||||
}
|
||||
IoctlCmd::TCSETSF => {
|
||||
let termios = read_val_from_user(arg)?;
|
||||
debug!("set termios = {:?}", termios);
|
||||
self.ldisc.set_termios(termios);
|
||||
self.ldisc.drain_input();
|
||||
// TODO: drain output buffer
|
||||
Ok(0)
|
||||
}
|
||||
IoctlCmd::TIOCGWINSZ => {
|
||||
// TODO:get window size
|
||||
Ok(0)
|
||||
|
Reference in New Issue
Block a user