ctr: parse mount options with embedded = character
FreeBSD mount options may have embedded = characters. For example, devfs(5) supports the `ruleset` option which can be passed as `ruleset=4` to indicate that ruleset 4 should be used. Signed-off-by: Samuel Karp <me@samuelkarp.com>
This commit is contained in:
parent
531908c73d
commit
535d9cc59f
@ -63,8 +63,8 @@ func parseMountFlag(m string) (specs.Mount, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, field := range fields {
|
for _, field := range fields {
|
||||||
v := strings.Split(field, "=")
|
v := strings.SplitN(field, "=", 2)
|
||||||
if len(v) != 2 {
|
if len(v) < 2 {
|
||||||
return mount, fmt.Errorf("invalid mount specification: expected key=val")
|
return mount, fmt.Errorf("invalid mount specification: expected key=val")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user