summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/devpts/terminal.go
diff options
context:
space:
mode:
authorAyush Ranjan <ayushranjan@google.com>2020-09-01 14:41:54 -0700
committergVisor bot <gvisor-bot@google.com>2020-09-01 14:43:41 -0700
commit2eaf54dd597d8aaa56ad6274e0c1e585d9b9c063 (patch)
tree040952f2e711bdc4664b90de967e1a0c31d9c75c /pkg/sentry/fsimpl/devpts/terminal.go
parent04c284f8c2015b801c929325a6304e601eb94e56 (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.go16
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
}