mirror of
https://github.com/containers/podman.git
synced 2025-12-11 17:27:19 +08:00
vendor: update containers/storage
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
12
vendor/github.com/containers/storage/pkg/mount/flags.go
generated
vendored
12
vendor/github.com/containers/storage/pkg/mount/flags.go
generated
vendored
@@ -97,14 +97,14 @@ func MergeTmpfsOptions(options []string) ([]string, error) {
|
||||
}
|
||||
continue
|
||||
}
|
||||
opt := strings.SplitN(option, "=", 2)
|
||||
if len(opt) != 2 || !validFlags[opt[0]] {
|
||||
opt, _, ok := strings.Cut(option, "=")
|
||||
if !ok || !validFlags[opt] {
|
||||
return nil, fmt.Errorf("invalid tmpfs option %q", opt)
|
||||
}
|
||||
if !dataCollisions[opt[0]] {
|
||||
if !dataCollisions[opt] {
|
||||
// We prepend the option and add to collision map
|
||||
newOptions = append([]string{option}, newOptions...)
|
||||
dataCollisions[opt[0]] = true
|
||||
dataCollisions[opt] = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,8 +140,8 @@ func ParseOptions(options string) (int, string) {
|
||||
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]] {
|
||||
opt, _, _ := strings.Cut(o, "=")
|
||||
if !validFlags[opt] {
|
||||
return 0, "", fmt.Errorf("invalid tmpfs option %q", opt)
|
||||
}
|
||||
}
|
||||
|
||||
10
vendor/github.com/containers/storage/pkg/mount/mounter_freebsd.go
generated
vendored
10
vendor/github.com/containers/storage/pkg/mount/mounter_freebsd.go
generated
vendored
@@ -40,13 +40,9 @@ func mount(device, target, mType string, flag uintptr, data string) error {
|
||||
isNullFS = true
|
||||
continue
|
||||
}
|
||||
opt := strings.SplitN(x, "=", 2)
|
||||
options = append(options, opt[0])
|
||||
if len(opt) == 2 {
|
||||
options = append(options, opt[1])
|
||||
} else {
|
||||
options = append(options, "")
|
||||
}
|
||||
name, val, _ := strings.Cut(x, "=")
|
||||
options = append(options, name)
|
||||
options = append(options, val)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
vendor/github.com/containers/storage/pkg/mount/unmount_unix.go
generated
vendored
2
vendor/github.com/containers/storage/pkg/mount/unmount_unix.go
generated
vendored
@@ -11,7 +11,7 @@ import (
|
||||
|
||||
func unmount(target string, flags int) error {
|
||||
var err error
|
||||
for i := 0; i < 50; i++ {
|
||||
for range 50 {
|
||||
err = unix.Unmount(target, flags)
|
||||
switch err {
|
||||
case unix.EBUSY:
|
||||
|
||||
Reference in New Issue
Block a user