summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/vfs/anonfs.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-03-28 00:02:06 +0000
committergVisor bot <gvisor-bot@google.com>2020-03-28 00:02:06 +0000
commitc52860cb85f5b5158a7ab8ae17df1c5f5eca6792 (patch)
tree2cbe0a631d87b09cfb92195d54e7e78542cdfd58 /pkg/sentry/vfs/anonfs.go
parenta6ea548493fda77685d10293a0380b37bee93617 (diff)
parentf6e4daa67ad5f07ac1bcff33476b4d13f49a69bc (diff)
Merge release-20200219.0-255-gf6e4daa (automated)
Diffstat (limited to 'pkg/sentry/vfs/anonfs.go')
-rwxr-xr-xpkg/sentry/vfs/anonfs.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkg/sentry/vfs/anonfs.go b/pkg/sentry/vfs/anonfs.go
index f58867066..d1f6dfb45 100755
--- a/pkg/sentry/vfs/anonfs.go
+++ b/pkg/sentry/vfs/anonfs.go
@@ -51,6 +51,19 @@ const (
anonFileGID = auth.RootKGID
)
+// anonFilesystemType implements FilesystemType.
+type anonFilesystemType struct{}
+
+// GetFilesystem implements FilesystemType.GetFilesystem.
+func (anonFilesystemType) GetFilesystem(context.Context, *VirtualFilesystem, *auth.Credentials, string, GetFilesystemOptions) (*Filesystem, *Dentry, error) {
+ panic("cannot instaniate an anon filesystem")
+}
+
+// Name implemenents FilesystemType.Name.
+func (anonFilesystemType) Name() string {
+ return "none"
+}
+
// anonFilesystem is the implementation of FilesystemImpl that backs
// VirtualDentries returned by VirtualFilesystem.NewAnonVirtualDentry().
//