summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/proc/loadavg.go
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2019-12-26 14:42:19 -0800
committergVisor bot <gvisor-bot@google.com>2019-12-26 14:45:35 -0800
commit3c125eb21946e1f6bf8f22f4169baafb7f07bf60 (patch)
treebb61b4a97a2bdb4f882a8855772d3ab743b7f83b /pkg/sentry/fsimpl/proc/loadavg.go
parent5b9034cc18cb515f9534b61c7e4fe3c2a12985bc (diff)
Initial procfs implementation in VFSv2
Updates #1195 PiperOrigin-RevId: 287227722
Diffstat (limited to 'pkg/sentry/fsimpl/proc/loadavg.go')
-rw-r--r--pkg/sentry/fsimpl/proc/loadavg.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkg/sentry/fsimpl/proc/loadavg.go b/pkg/sentry/fsimpl/proc/loadavg.go
index 9135afef1..5351d86e8 100644
--- a/pkg/sentry/fsimpl/proc/loadavg.go
+++ b/pkg/sentry/fsimpl/proc/loadavg.go
@@ -19,15 +19,17 @@ import (
"fmt"
"gvisor.dev/gvisor/pkg/sentry/context"
- "gvisor.dev/gvisor/pkg/sentry/vfs"
+ "gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs"
)
// loadavgData backs /proc/loadavg.
//
// +stateify savable
-type loadavgData struct{}
+type loadavgData struct {
+ kernfs.DynamicBytesFile
+}
-var _ vfs.DynamicBytesSource = (*loadavgData)(nil)
+var _ dynamicInode = (*loadavgData)(nil)
// Generate implements vfs.DynamicBytesSource.Generate.
func (d *loadavgData) Generate(ctx context.Context, buf *bytes.Buffer) error {