diff options
author | Ridwan Sharif <ridwanmsharif@google.com> | 2020-06-17 16:23:27 -0400 |
---|---|---|
committer | Ridwan Sharif <ridwanmsharif@google.com> | 2020-06-25 14:22:21 -0400 |
commit | a63db7d90303280de9431f369e5a9c8db351a9e8 (patch) | |
tree | 8716e8e0380f2702a35fb005402b6516a16a8225 /runsc/boot | |
parent | bd5f0e2dc42866f28437f07b1a24e19d1748c3ea (diff) |
Moved FUSE device under the fuse directory
Diffstat (limited to 'runsc/boot')
-rw-r--r-- | runsc/boot/BUILD | 1 | ||||
-rw-r--r-- | runsc/boot/vfs.go | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/runsc/boot/BUILD b/runsc/boot/BUILD index 45d7f7d09..aad2a41de 100644 --- a/runsc/boot/BUILD +++ b/runsc/boot/BUILD @@ -55,6 +55,7 @@ go_library( "//pkg/sentry/fs/user", "//pkg/sentry/fsimpl/devpts", "//pkg/sentry/fsimpl/devtmpfs", + "//pkg/sentry/fsimpl/fuse", "//pkg/sentry/fsimpl/gofer", "//pkg/sentry/fsimpl/host", "//pkg/sentry/fsimpl/overlay", diff --git a/runsc/boot/vfs.go b/runsc/boot/vfs.go index 9ba5e9cd9..0f5ad1e05 100644 --- a/runsc/boot/vfs.go +++ b/runsc/boot/vfs.go @@ -31,6 +31,7 @@ import ( "gvisor.dev/gvisor/pkg/sentry/fs/user" "gvisor.dev/gvisor/pkg/sentry/fsimpl/devpts" "gvisor.dev/gvisor/pkg/sentry/fsimpl/devtmpfs" + "gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse" "gvisor.dev/gvisor/pkg/sentry/fsimpl/gofer" "gvisor.dev/gvisor/pkg/sentry/fsimpl/overlay" "gvisor.dev/gvisor/pkg/sentry/fsimpl/proc" @@ -79,6 +80,9 @@ func registerFilesystems(ctx context.Context, vfsObj *vfs.VirtualFilesystem, cre } if err := ttydev.Register(vfsObj); err != nil { return fmt.Errorf("registering ttydev: %w", err) + + if err := fuse.Register(vfsObj); err != nil { + return fmt.Errorf("registering /dev/fuse: %w", err) } if err := tundev.Register(vfsObj); err != nil { return fmt.Errorf("registering tundev: %v", err) @@ -101,6 +105,9 @@ func registerFilesystems(ctx context.Context, vfsObj *vfs.VirtualFilesystem, cre if err := tundev.CreateDevtmpfsFiles(ctx, a); err != nil { return fmt.Errorf("creating tundev devtmpfs files: %v", err) } + if err := fuse.CreateDevtmpfsFile(ctx, a); err != nil { + return fmt.Errorf("creating devtmpfs fuse device file: %w", err) + } return nil } |