diff options
author | Kevin Krakauer <krakauer@google.com> | 2018-06-07 10:20:28 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-06-07 10:21:22 -0700 |
commit | 9170303105bedbe7dda1d11b196e21abe9040cdf (patch) | |
tree | 200f3aa2797aff7f22ffd75f831c7e9e9884425e /pkg/sentry/fs/tty/terminal.go | |
parent | d26984515900a2f88da047ee8a28ba1ca152aa58 (diff) |
Sentry: very basic terminal echo support.
Adds support for echo to terminals. Echoing is just copying input back out to
the user, e.g. when I type "foo" into a terminal, I expect "foo" to be echoed
back to my terminal.
Also makes the transform function part of the queue, eliminating the need to
pass them around together and the possibility of using the wrong transform for a
queue.
PiperOrigin-RevId: 199655147
Change-Id: I37c490d4fc1ee91da20ae58ba1f884a5c14fd0d8
Diffstat (limited to 'pkg/sentry/fs/tty/terminal.go')
-rw-r--r-- | pkg/sentry/fs/tty/terminal.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/fs/tty/terminal.go b/pkg/sentry/fs/tty/terminal.go index 6ae713a32..fa5b00409 100644 --- a/pkg/sentry/fs/tty/terminal.go +++ b/pkg/sentry/fs/tty/terminal.go @@ -31,7 +31,7 @@ type Terminal struct { d *dirInodeOperations // ld is the line discipline of the terminal. - ld lineDiscipline + ld *lineDiscipline } func newTerminal(ctx context.Context, d *dirInodeOperations, n uint32) *Terminal { @@ -39,6 +39,6 @@ func newTerminal(ctx context.Context, d *dirInodeOperations, n uint32) *Terminal return &Terminal{ d: d, n: n, - ld: lineDiscipline{termios: termios}, + ld: newLineDiscipline(termios), } } |