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:
commit
6e86b1198f
1 changed files with 0 additions and 12 deletions
|
@ -135,15 +135,3 @@ func parseOptions(options string) (int, string) {
|
||||||
}
|
}
|
||||||
return flag, strings.Join(data, ",")
|
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
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue