diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-11-27 02:23:28 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-11-27 02:23:28 +0000 |
commit | 71e5ce0d31623f55021f9935db29029b2ab5523a (patch) | |
tree | 5adcb6f0e1c8de11051ac09ef6c1c7bf5766bc83 /pkg/sentry/fs/tty | |
parent | 38a00b7cdbd1d3f0b3fe49157e402b32f5c989e8 (diff) | |
parent | 20279c305ece6a458006999c8dafc5672ca92803 (diff) |
Merge release-20191114.0-39-g20279c3 (automated)
Diffstat (limited to 'pkg/sentry/fs/tty')
-rw-r--r-- | pkg/sentry/fs/tty/master.go | 6 | ||||
-rw-r--r-- | pkg/sentry/fs/tty/slave.go | 6 | ||||
-rwxr-xr-x | pkg/sentry/fs/tty/tty_state_autogen.go | 4 |
3 files changed, 10 insertions, 6 deletions
diff --git a/pkg/sentry/fs/tty/master.go b/pkg/sentry/fs/tty/master.go index bc56be696..934828c12 100644 --- a/pkg/sentry/fs/tty/master.go +++ b/pkg/sentry/fs/tty/master.go @@ -32,7 +32,6 @@ import ( // +stateify savable type masterInodeOperations struct { fsutil.SimpleFileInode - fsutil.InodeNoopTruncate // d is the containing dir. d *dirInodeOperations @@ -77,6 +76,11 @@ func newMasterInode(ctx context.Context, d *dirInodeOperations, owner fs.FileOwn func (mi *masterInodeOperations) Release(ctx context.Context) { } +// Truncate implements fs.InodeOperations.Truncate. +func (masterInodeOperations) Truncate(context.Context, *fs.Inode, int64) error { + return nil +} + // GetFile implements fs.InodeOperations.GetFile. // // It allocates a new terminal. diff --git a/pkg/sentry/fs/tty/slave.go b/pkg/sentry/fs/tty/slave.go index 4cbea0367..2a51e6bab 100644 --- a/pkg/sentry/fs/tty/slave.go +++ b/pkg/sentry/fs/tty/slave.go @@ -31,7 +31,6 @@ import ( // +stateify savable type slaveInodeOperations struct { fsutil.SimpleFileInode - fsutil.InodeNoopTruncate // d is the containing dir. d *dirInodeOperations @@ -73,6 +72,11 @@ func (si *slaveInodeOperations) Release(ctx context.Context) { si.t.DecRef() } +// Truncate implements fs.InodeOperations.Truncate. +func (slaveInodeOperations) Truncate(context.Context, *fs.Inode, int64) error { + return nil +} + // GetFile implements fs.InodeOperations.GetFile. // // This may race with destruction of the terminal. If the terminal is gone, it diff --git a/pkg/sentry/fs/tty/tty_state_autogen.go b/pkg/sentry/fs/tty/tty_state_autogen.go index 676e531c7..c54600104 100755 --- a/pkg/sentry/fs/tty/tty_state_autogen.go +++ b/pkg/sentry/fs/tty/tty_state_autogen.go @@ -101,14 +101,12 @@ func (x *masterInodeOperations) beforeSave() {} func (x *masterInodeOperations) save(m state.Map) { x.beforeSave() m.Save("SimpleFileInode", &x.SimpleFileInode) - m.Save("InodeNoopTruncate", &x.InodeNoopTruncate) m.Save("d", &x.d) } func (x *masterInodeOperations) afterLoad() {} func (x *masterInodeOperations) load(m state.Map) { m.Load("SimpleFileInode", &x.SimpleFileInode) - m.Load("InodeNoopTruncate", &x.InodeNoopTruncate) m.Load("d", &x.d) } @@ -148,7 +146,6 @@ func (x *slaveInodeOperations) beforeSave() {} func (x *slaveInodeOperations) save(m state.Map) { x.beforeSave() m.Save("SimpleFileInode", &x.SimpleFileInode) - m.Save("InodeNoopTruncate", &x.InodeNoopTruncate) m.Save("d", &x.d) m.Save("t", &x.t) } @@ -156,7 +153,6 @@ func (x *slaveInodeOperations) save(m state.Map) { func (x *slaveInodeOperations) afterLoad() {} func (x *slaveInodeOperations) load(m state.Map) { m.Load("SimpleFileInode", &x.SimpleFileInode) - m.Load("InodeNoopTruncate", &x.InodeNoopTruncate) m.Load("d", &x.d) m.Load("t", &x.t) } |