tty: enable TCSETSF

While there is a difference between flavors of this ioctl (`TCSETS`,
`TCSETSF`, `TCSETSW`), in practice it seems not to matter. We should let
users call `TCSETSF` and can implement those differences if necessary.
This commit is contained in:
Kevin Krakauer
2023-09-05 09:53:50 -07:00
parent c2a7efe6a2
commit 7928ff6f0c
3 changed files with 42 additions and 0 deletions
+4
View File
@@ -158,6 +158,10 @@ func (mfd *masterFileDescription) Ioctl(ctx context.Context, io usermem.IO, sysn
case linux.TCSETSW:
// TODO(b/29356795): This should drain the output queue first.
return mfd.t.ld.setTermios(t, args)
case linux.TCSETSF:
// TODO(b/29356795): This should drain the output queue and
// clear the input queue first.
return mfd.t.ld.setTermios(t, args)
case linux.TIOCGPTN:
nP := primitive.Uint32(mfd.t.n)
_, err := nP.CopyOut(t, args[2].Pointer())
+4
View File
@@ -170,6 +170,10 @@ func (rfd *replicaFileDescription) Ioctl(ctx context.Context, io usermem.IO, sys
case linux.TCSETSW:
// TODO(b/29356795): This should drain the output queue first.
return rfd.inode.t.ld.setTermios(t, args)
case linux.TCSETSF:
// TODO(b/29356795): This should drain the output queue and
// clear the input queue first.
return rfd.inode.t.ld.setTermios(t, args)
case linux.TIOCGPTN:
nP := primitive.Uint32(rfd.inode.t.n)
_, err := nP.CopyOut(t, args[2].Pointer())