MCPcopy Create free account
hub / github.com/apache/mesos / typeName

Function typeName

src/linux/fs.cpp:143–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141
142
143Try<string> typeName(uint32_t fsType)
144{
145 // `typeNames` maps a filesystem id to its filesystem type name.
146 hashmap<uint32_t, string> typeNames = {
147 {FS_TYPE_AUFS , "aufs"},
148 {FS_TYPE_BTRFS , "btrfs"},
149 {FS_TYPE_CRAMFS , "cramfs"},
150 {FS_TYPE_ECRYPTFS , "ecryptfs"},
151 {FS_TYPE_EXTFS , "extfs"},
152 {FS_TYPE_F2FS , "f2fs"},
153 {FS_TYPE_GPFS , "gpfs"},
154 {FS_TYPE_JFFS2FS , "jffs2fs"},
155 {FS_TYPE_JFS , "jfs"},
156 {FS_TYPE_NFSFS , "nfsfs"},
157 {FS_TYPE_RAMFS , "ramfs"},
158 {FS_TYPE_REISERFS , "reiserfs"},
159 {FS_TYPE_SMBFS , "smbfs"},
160 {FS_TYPE_SQUASHFS , "squashfs"},
161 {FS_TYPE_TMPFS , "tmpfs"},
162 {FS_TYPE_VXFS , "vxfs"},
163 {FS_TYPE_XFS , "xfs"},
164 {FS_TYPE_ZFS , "zfs"},
165 {FS_TYPE_OVERLAY , "overlay"}
166 };
167
168 if (!typeNames.contains(fsType)) {
169 return Error("Unexpected filesystem type '" + stringify(fsType) + "'");
170 }
171
172 return typeNames[fsType];
173}
174
175
176Try<MountInfoTable> MountInfoTable::read(

Callers 1

validateBackendFunction · 0.85

Calls 3

stringifyFunction · 0.70
ErrorFunction · 0.50
containsMethod · 0.45

Tested by

no test coverage detected