diff options
Diffstat (limited to 'pkg/sentry/fs/tty')
-rw-r--r-- | pkg/sentry/fs/tty/line_discipline.go | 4 | ||||
-rw-r--r-- | pkg/sentry/fs/tty/tty_state_autogen.go | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/pkg/sentry/fs/tty/line_discipline.go b/pkg/sentry/fs/tty/line_discipline.go index f9fca6d8e..f2c9e9668 100644 --- a/pkg/sentry/fs/tty/line_discipline.go +++ b/pkg/sentry/fs/tty/line_discipline.go @@ -102,10 +102,10 @@ type lineDiscipline struct { column int // masterWaiter is used to wait on the master end of the TTY. - masterWaiter waiter.Queue `state:"zerovalue"` + masterWaiter waiter.Queue // replicaWaiter is used to wait on the replica end of the TTY. - replicaWaiter waiter.Queue `state:"zerovalue"` + replicaWaiter waiter.Queue } func newLineDiscipline(termios linux.KernelTermios) *lineDiscipline { diff --git a/pkg/sentry/fs/tty/tty_state_autogen.go b/pkg/sentry/fs/tty/tty_state_autogen.go index 2fb0a8d27..1319a8d28 100644 --- a/pkg/sentry/fs/tty/tty_state_autogen.go +++ b/pkg/sentry/fs/tty/tty_state_autogen.go @@ -127,6 +127,8 @@ func (l *lineDiscipline) StateFields() []string { "outQueue", "termios", "column", + "masterWaiter", + "replicaWaiter", } } @@ -135,17 +137,13 @@ func (l *lineDiscipline) beforeSave() {} // +checklocksignore func (l *lineDiscipline) StateSave(stateSinkObject state.Sink) { l.beforeSave() - if !state.IsZeroValue(&l.masterWaiter) { - state.Failf("masterWaiter is %#v, expected zero", &l.masterWaiter) - } - if !state.IsZeroValue(&l.replicaWaiter) { - state.Failf("replicaWaiter is %#v, expected zero", &l.replicaWaiter) - } stateSinkObject.Save(0, &l.size) stateSinkObject.Save(1, &l.inQueue) stateSinkObject.Save(2, &l.outQueue) stateSinkObject.Save(3, &l.termios) stateSinkObject.Save(4, &l.column) + stateSinkObject.Save(5, &l.masterWaiter) + stateSinkObject.Save(6, &l.replicaWaiter) } func (l *lineDiscipline) afterLoad() {} @@ -157,6 +155,8 @@ func (l *lineDiscipline) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(2, &l.outQueue) stateSourceObject.Load(3, &l.termios) stateSourceObject.Load(4, &l.column) + stateSourceObject.Load(5, &l.masterWaiter) + stateSourceObject.Load(6, &l.replicaWaiter) } func (o *outputQueueTransformer) StateTypeName() string { |