summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/tty/master.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/fs/tty/master.go')
-rw-r--r--pkg/sentry/fs/tty/master.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/sentry/fs/tty/master.go b/pkg/sentry/fs/tty/master.go
index 3c47ee517..74cdbe874 100644
--- a/pkg/sentry/fs/tty/master.go
+++ b/pkg/sentry/fs/tty/master.go
@@ -148,6 +148,9 @@ func (mf *masterFileOperations) Write(ctx context.Context, _ *fs.File, src userm
// Ioctl implements fs.FileOperations.Ioctl.
func (mf *masterFileOperations) Ioctl(ctx context.Context, io usermem.IO, args arch.SyscallArguments) (uintptr, error) {
switch args[1].Uint() {
+ case linux.FIONREAD: // linux.FIONREAD == linux.TIOCINQ
+ // Get the number of bytes in the output queue read buffer.
+ return 0, mf.t.ld.outputQueueReadSize(ctx, io, args)
case linux.TCGETS:
// N.B. TCGETS on the master actually returns the configuration
// of the slave end.