1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #38780 from thaJeztah/remove_parse_tmpfs_options

pkg/mount: remove unused ParseTmpfsOptions
This commit is contained in:
Yong Tang 2019-03-04 10:01:41 -08:00 committed by GitHub
commit 6e86b1198f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -135,15 +135,3 @@ func parseOptions(options string) (int, string) {
}
return flag, strings.Join(data, ",")
}
// ParseTmpfsOptions parse fstab type mount options into flags and data
func ParseTmpfsOptions(options string) (int, string, error) {
flags, data := parseOptions(options)
for _, o := range strings.Split(data, ",") {
opt := strings.SplitN(o, "=", 2)
if !validFlags[opt[0]] {
return 0, "", fmt.Errorf("Invalid tmpfs option %q", opt)
}
}
return flags, data, nil
}