diff options
author | Ayush Ranjan <ayushranjan@google.com> | 2020-09-01 14:41:54 -0700 |
---|---|---|
committer | Andrei Vagin <avagin@gmail.com> | 2020-09-09 17:53:10 -0700 |
commit | 4332affa833c6a11326aa5db366419ba7445cdaf (patch) | |
tree | 2aa053f1dae3f77fcf5a53ef49408d86eb7f23b3 /pkg/sentry/fsimpl/devpts/terminal.go | |
parent | 6b992edc8ab85070f50a6860b936b6cef82d48f8 (diff) |
Refactor tty codebase to use master-replica terminology.
Updates #2972
PiperOrigin-RevId: 329584905
Diffstat (limited to 'pkg/sentry/fsimpl/devpts/terminal.go')
-rw-r--r-- | pkg/sentry/fsimpl/devpts/terminal.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pkg/sentry/fsimpl/devpts/terminal.go b/pkg/sentry/fsimpl/devpts/terminal.go index e88eb6360..731955d62 100644 --- a/pkg/sentry/fsimpl/devpts/terminal.go +++ b/pkg/sentry/fsimpl/devpts/terminal.go @@ -36,18 +36,18 @@ type Terminal struct { // this terminal. This field is immutable. masterKTTY *kernel.TTY - // slaveKTTY contains the controlling process of the slave end of this + // replicaKTTY contains the controlling process of the replica end of this // terminal. This field is immutable. - slaveKTTY *kernel.TTY + replicaKTTY *kernel.TTY } func newTerminal(n uint32) *Terminal { - termios := linux.DefaultSlaveTermios + termios := linux.DefaultReplicaTermios t := Terminal{ - n: n, - ld: newLineDiscipline(termios), - masterKTTY: &kernel.TTY{Index: n}, - slaveKTTY: &kernel.TTY{Index: n}, + n: n, + ld: newLineDiscipline(termios), + masterKTTY: &kernel.TTY{Index: n}, + replicaKTTY: &kernel.TTY{Index: n}, } return &t } @@ -113,5 +113,5 @@ func (tm *Terminal) tty(isMaster bool) *kernel.TTY { if isMaster { return tm.masterKTTY } - return tm.slaveKTTY + return tm.replicaKTTY } |