Skip to content

Commit 535d9cc

Browse files
committed
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 <[email protected]>
1 parent 531908c commit 535d9cc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cmd/ctr/commands/run/run.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ func parseMountFlag(m string) (specs.Mount, error) {
6363
}
6464

6565
for _, field := range fields {
66-
v := strings.Split(field, "=")
67-
if len(v) != 2 {
66+
v := strings.SplitN(field, "=", 2)
67+
if len(v) < 2 {
6868
return mount, fmt.Errorf("invalid mount specification: expected key=val")
6969
}
7070

0 commit comments

Comments
 (0)