Browse code

pkg/mount: remove unused ParseTmpfsOptions

This function was previously used on the client to validate
tmpfs options, but is no longer used since
b9b8d8b364a14b6f827c9db94f651dda372ed253, as this validation
is platform-specific, so should be handled by the daemon.

Removing this function as it's no longer used anywhere.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2019/02/22 20:55:33
Showing 1 changed files
... ...
@@ -135,15 +135,3 @@ func parseOptions(options string) (int, string) {
135 135
 	}
136 136
 	return flag, strings.Join(data, ",")
137 137
 }
138
-
139
-// ParseTmpfsOptions parse fstab type mount options into flags and data
140
-func ParseTmpfsOptions(options string) (int, string, error) {
141
-	flags, data := parseOptions(options)
142
-	for _, o := range strings.Split(data, ",") {
143
-		opt := strings.SplitN(o, "=", 2)
144
-		if !validFlags[opt[0]] {
145
-			return 0, "", fmt.Errorf("Invalid tmpfs option %q", opt)
146
-		}
147
-	}
148
-	return flags, data, nil
149
-}