summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/proc
diff options
context:
space:
mode:
authorNicolas Lacasse <nlacasse@google.com>2019-05-08 14:34:01 -0700
committerShentubot <shentubot@google.com>2019-05-08 14:35:06 -0700
commitbfd9f75ba4390de824d2c3d44c15bdca9dd0ff35 (patch)
tree8f5b2aca671216bb586e6d6bf2f463dc954a4746 /pkg/sentry/fs/proc
parentcbf6ab96970f29694ee4732f10c0515105b68449 (diff)
Set the FilesytemType in MountSource from the Filesystem.
And stop storing the Filesystem in the MountSource. This allows us to decouple the MountSource filesystem type from the name of the filesystem. PiperOrigin-RevId: 247292982 Change-Id: I49cbcce3c17883b7aa918ba76203dfd6d1b03cc8
Diffstat (limited to 'pkg/sentry/fs/proc')
-rw-r--r--pkg/sentry/fs/proc/mounts.go12
1 files changed, 2 insertions, 10 deletions
diff --git a/pkg/sentry/fs/proc/mounts.go b/pkg/sentry/fs/proc/mounts.go
index 37ed30724..b5e01301f 100644
--- a/pkg/sentry/fs/proc/mounts.go
+++ b/pkg/sentry/fs/proc/mounts.go
@@ -139,11 +139,7 @@ func (mif *mountInfoFile) ReadSeqFileData(ctx context.Context, handle seqfile.Se
fmt.Fprintf(&buf, "- ")
// (9) Filesystem type.
- name := "none"
- if m.Filesystem != nil {
- name = m.Filesystem.Name()
- }
- fmt.Fprintf(&buf, "%s ", name)
+ fmt.Fprintf(&buf, "%s ", m.FilesystemType)
// (10) Mount source: filesystem-specific information or "none".
fmt.Fprintf(&buf, "none ")
@@ -190,11 +186,7 @@ func (mf *mountsFile) ReadSeqFileData(ctx context.Context, handle seqfile.SeqHan
if m.Flags.ReadOnly {
opts = "ro"
}
- name := "none"
- if m.Filesystem != nil {
- name = m.Filesystem.Name()
- }
- fmt.Fprintf(&buf, "%s %s %s %s %d %d\n", "none", mountPath, name, opts, 0, 0)
+ fmt.Fprintf(&buf, "%s %s %s %s %d %d\n", "none", mountPath, m.FilesystemType, opts, 0, 0)
})
return []seqfile.SeqData{{Buf: buf.Bytes(), Handle: (*mountsFile)(nil)}}, 0