diff options
author | Fabricio Voznika <fvoznika@google.com> | 2019-12-26 14:42:19 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-12-26 14:45:35 -0800 |
commit | 3c125eb21946e1f6bf8f22f4169baafb7f07bf60 (patch) | |
tree | bb61b4a97a2bdb4f882a8855772d3ab743b7f83b /pkg/sentry/fsimpl/proc/meminfo.go | |
parent | 5b9034cc18cb515f9534b61c7e4fe3c2a12985bc (diff) |
Initial procfs implementation in VFSv2
Updates #1195
PiperOrigin-RevId: 287227722
Diffstat (limited to 'pkg/sentry/fsimpl/proc/meminfo.go')
-rw-r--r-- | pkg/sentry/fsimpl/proc/meminfo.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkg/sentry/fsimpl/proc/meminfo.go b/pkg/sentry/fsimpl/proc/meminfo.go index 9a827cd66..cbdd4f3fc 100644 --- a/pkg/sentry/fsimpl/proc/meminfo.go +++ b/pkg/sentry/fsimpl/proc/meminfo.go @@ -19,21 +19,23 @@ import ( "fmt" "gvisor.dev/gvisor/pkg/sentry/context" + "gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs" "gvisor.dev/gvisor/pkg/sentry/kernel" "gvisor.dev/gvisor/pkg/sentry/usage" "gvisor.dev/gvisor/pkg/sentry/usermem" - "gvisor.dev/gvisor/pkg/sentry/vfs" ) // meminfoData implements vfs.DynamicBytesSource for /proc/meminfo. // // +stateify savable type meminfoData struct { + kernfs.DynamicBytesFile + // k is the owning Kernel. k *kernel.Kernel } -var _ vfs.DynamicBytesSource = (*meminfoData)(nil) +var _ dynamicInode = (*meminfoData)(nil) // Generate implements vfs.DynamicBytesSource.Generate. func (d *meminfoData) Generate(ctx context.Context, buf *bytes.Buffer) error { |