summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/tmpfs/tmpfs.go
diff options
context:
space:
mode:
authorDean Deng <deandeng@google.com>2020-02-07 14:46:24 -0800
committergVisor bot <gvisor-bot@google.com>2020-02-07 14:47:13 -0800
commit17b9f5e66238bde1e4ed3bd9e5fb67342c8b58ec (patch)
tree7d22c13978117ef63c5dc72f412ca869c99cde2d /pkg/sentry/fs/tmpfs/tmpfs.go
parente1587a28876f8aac689a2cd1b7630f1637655b58 (diff)
Support listxattr and removexattr syscalls.
Note that these are only implemented for tmpfs, and other impls will still return EOPNOTSUPP. PiperOrigin-RevId: 293899385
Diffstat (limited to 'pkg/sentry/fs/tmpfs/tmpfs.go')
-rw-r--r--pkg/sentry/fs/tmpfs/tmpfs.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkg/sentry/fs/tmpfs/tmpfs.go b/pkg/sentry/fs/tmpfs/tmpfs.go
index c00cef0a5..3c2b583ae 100644
--- a/pkg/sentry/fs/tmpfs/tmpfs.go
+++ b/pkg/sentry/fs/tmpfs/tmpfs.go
@@ -159,8 +159,13 @@ func (d *Dir) SetXattr(ctx context.Context, i *fs.Inode, name, value string, fla
}
// ListXattr implements fs.InodeOperations.ListXattr.
-func (d *Dir) ListXattr(ctx context.Context, i *fs.Inode) (map[string]struct{}, error) {
- return d.ramfsDir.ListXattr(ctx, i)
+func (d *Dir) ListXattr(ctx context.Context, i *fs.Inode, size uint64) (map[string]struct{}, error) {
+ return d.ramfsDir.ListXattr(ctx, i, size)
+}
+
+// RemoveXattr implements fs.InodeOperations.RemoveXattr.
+func (d *Dir) RemoveXattr(ctx context.Context, i *fs.Inode, name string) error {
+ return d.ramfsDir.RemoveXattr(ctx, i, name)
}
// Lookup implements fs.InodeOperations.Lookup.