mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit to 539be170
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
1
vendor/github.com/moby/sys/mount/flags_bsd.go
generated
vendored
1
vendor/github.com/moby/sys/mount/flags_bsd.go
generated
vendored
@ -1,3 +1,4 @@
|
||||
//go:build freebsd || openbsd
|
||||
// +build freebsd openbsd
|
||||
|
||||
package mount
|
||||
|
3
vendor/github.com/moby/sys/mount/flags_unix.go
generated
vendored
3
vendor/github.com/moby/sys/mount/flags_unix.go
generated
vendored
@ -1,3 +1,4 @@
|
||||
//go:build !darwin && !windows
|
||||
// +build !darwin,!windows
|
||||
|
||||
package mount
|
||||
@ -101,7 +102,7 @@ func MergeTmpfsOptions(options []string) ([]string, error) {
|
||||
}
|
||||
opt := strings.SplitN(option, "=", 2)
|
||||
if len(opt) != 2 || !validFlags[opt[0]] {
|
||||
return nil, fmt.Errorf("Invalid tmpfs option %q", opt)
|
||||
return nil, fmt.Errorf("invalid tmpfs option %q", opt)
|
||||
}
|
||||
if !dataCollisions[opt[0]] {
|
||||
// We prepend the option and add to collision map
|
||||
|
6
vendor/github.com/moby/sys/mount/go.mod
generated
vendored
6
vendor/github.com/moby/sys/mount/go.mod
generated
vendored
@ -1,8 +1,8 @@
|
||||
module github.com/moby/sys/mount
|
||||
|
||||
go 1.14
|
||||
go 1.16
|
||||
|
||||
require (
|
||||
github.com/moby/sys/mountinfo v0.4.0
|
||||
golang.org/x/sys v0.0.0-20200922070232-aee5d888a860
|
||||
github.com/moby/sys/mountinfo v0.5.0
|
||||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359
|
||||
)
|
||||
|
9
vendor/github.com/moby/sys/mount/go.sum
generated
vendored
9
vendor/github.com/moby/sys/mount/go.sum
generated
vendored
@ -1,5 +1,4 @@
|
||||
github.com/moby/sys/mountinfo v0.4.0 h1:1KInV3Huv18akCu58V7lzNlt+jFmqlu1EaErnEHE/VM=
|
||||
github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
|
||||
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200922070232-aee5d888a860 h1:YEu4SMq7D0cmT7CBbXfcH0NZeuChAXwsHe/9XueUO6o=
|
||||
golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
github.com/moby/sys/mountinfo v0.5.0 h1:2Ks8/r6lopsxWi9m58nlwjaeSzUX9iiL1vj5qB/9ObI=
|
||||
github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU=
|
||||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359 h1:2B5p2L5IfGiD7+b9BOoRMC6DgObAVZV+Fsp050NqXik=
|
||||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
|
1
vendor/github.com/moby/sys/mount/mount_errors.go
generated
vendored
1
vendor/github.com/moby/sys/mount/mount_errors.go
generated
vendored
@ -1,3 +1,4 @@
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package mount
|
||||
|
3
vendor/github.com/moby/sys/mount/mount_unix.go
generated
vendored
3
vendor/github.com/moby/sys/mount/mount_unix.go
generated
vendored
@ -1,3 +1,4 @@
|
||||
//go:build !darwin && !windows
|
||||
// +build !darwin,!windows
|
||||
|
||||
package mount
|
||||
@ -22,7 +23,7 @@ func Mount(device, target, mType, options string) error {
|
||||
// a normal unmount. If target is not a mount point, no error is returned.
|
||||
func Unmount(target string) error {
|
||||
err := unix.Unmount(target, mntDetach)
|
||||
if err == nil || err == unix.EINVAL {
|
||||
if err == nil || err == unix.EINVAL { //nolint:errorlint // unix errors are bare
|
||||
// Ignore "not mounted" error here. Note the same error
|
||||
// can be returned if flags are invalid, so this code
|
||||
// assumes that the flags value is always correct.
|
||||
|
@ -1,4 +1,5 @@
|
||||
// +build freebsd,cgo openbsd,cgo
|
||||
//go:build freebsd && cgo
|
||||
// +build freebsd,cgo
|
||||
|
||||
package mount
|
||||
|
1
vendor/github.com/moby/sys/mount/mounter_linux.go
generated
vendored
1
vendor/github.com/moby/sys/mount/mounter_linux.go
generated
vendored
@ -65,7 +65,6 @@ func mount(device, target, mType string, flags uintptr, data string) error {
|
||||
flags: oflags | unix.MS_REMOUNT,
|
||||
err: err,
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
78
vendor/github.com/moby/sys/mount/mounter_openbsd.go
generated
vendored
Normal file
78
vendor/github.com/moby/sys/mount/mounter_openbsd.go
generated
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
//go:build openbsd && cgo
|
||||
// +build openbsd,cgo
|
||||
|
||||
/*
|
||||
Due to how OpenBSD mount(2) works, filesystem types need to be
|
||||
supported explicitly since it uses separate structs to pass
|
||||
filesystem-specific arguments.
|
||||
|
||||
For now only UFS/FFS is supported as it's the default fs
|
||||
on OpenBSD systems.
|
||||
|
||||
See: https://man.openbsd.org/mount.2
|
||||
*/
|
||||
|
||||
package mount
|
||||
|
||||
/*
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func createExportInfo(readOnly bool) C.struct_export_args {
|
||||
exportFlags := C.int(0)
|
||||
if readOnly {
|
||||
exportFlags = C.MNT_EXRDONLY
|
||||
}
|
||||
out := C.struct_export_args{
|
||||
ex_root: 0,
|
||||
ex_flags: exportFlags,
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
func createUfsArgs(device string, readOnly bool) unsafe.Pointer {
|
||||
out := &C.struct_ufs_args{
|
||||
fspec: C.CString(device),
|
||||
export_info: createExportInfo(readOnly),
|
||||
}
|
||||
return unsafe.Pointer(out)
|
||||
}
|
||||
|
||||
func mount(device, target, mType string, flag uintptr, data string) error {
|
||||
readOnly := flag&RDONLY != 0
|
||||
|
||||
var fsArgs unsafe.Pointer
|
||||
|
||||
switch mType {
|
||||
case "ffs":
|
||||
fsArgs = createUfsArgs(device, readOnly)
|
||||
default:
|
||||
return &mountError{
|
||||
op: "mount",
|
||||
source: device,
|
||||
target: target,
|
||||
flags: flag,
|
||||
err: fmt.Errorf("unsupported file system type: %s", mType),
|
||||
}
|
||||
}
|
||||
|
||||
if errno := C.mount(C.CString(mType), C.CString(target), C.int(flag), fsArgs); errno != 0 {
|
||||
return &mountError{
|
||||
op: "mount",
|
||||
source: device,
|
||||
target: target,
|
||||
flags: flag,
|
||||
err: syscall.Errno(errno),
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
1
vendor/github.com/moby/sys/mount/mounter_unsupported.go
generated
vendored
1
vendor/github.com/moby/sys/mount/mounter_unsupported.go
generated
vendored
@ -1,3 +1,4 @@
|
||||
//go:build (!linux && !freebsd && !openbsd && !windows) || (freebsd && !cgo) || (openbsd && !cgo)
|
||||
// +build !linux,!freebsd,!openbsd,!windows freebsd,!cgo openbsd,!cgo
|
||||
|
||||
package mount
|
||||
|
Reference in New Issue
Block a user