From 986208ba302f3f7af2fc24065d906c63777df48d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20F=2E=20R=C3=B8dseth?= Date: Sat, 3 Sep 2022 13:12:10 +0200 Subject: [PATCH] Update dependencies --- v2/go.mod | 2 +- v2/go.sum | 4 +-- .../golang.org/x/sys/unix/ioctl_linux.go | 20 +++++++++++--- v2/vendor/golang.org/x/sys/unix/str.go | 27 ------------------- .../golang.org/x/sys/unix/syscall_linux.go | 3 ++- v2/vendor/modules.txt | 2 +- 6 files changed, 23 insertions(+), 35 deletions(-) delete mode 100644 v2/vendor/golang.org/x/sys/unix/str.go diff --git a/v2/go.mod b/v2/go.mod index 80bde56a..27bc8376 100644 --- a/v2/go.mod +++ b/v2/go.mod @@ -27,5 +27,5 @@ require ( github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect github.com/pkg/term v1.2.0-beta.2.0.20210419004637-f749b98bd0ba // indirect github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d // indirect - golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64 // indirect + golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 // indirect ) diff --git a/v2/go.sum b/v2/go.sum index 14446248..d1a93b80 100644 --- a/v2/go.sum +++ b/v2/go.sum @@ -70,6 +70,6 @@ golang.org/x/sys v0.0.0-20211004093028-2c5d950f24ef/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64 h1:UiNENfZ8gDvpiWw7IpOMQ27spWmThO1RwwdQVbJahJM= -golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 h1:v6hYoSR9T5oet+pMXwUWkbiVqx/63mlHjefrHmxwfeY= +golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/v2/vendor/golang.org/x/sys/unix/ioctl_linux.go b/v2/vendor/golang.org/x/sys/unix/ioctl_linux.go index 884430b8..0d12c085 100644 --- a/v2/vendor/golang.org/x/sys/unix/ioctl_linux.go +++ b/v2/vendor/golang.org/x/sys/unix/ioctl_linux.go @@ -4,9 +4,7 @@ package unix -import ( - "unsafe" -) +import "unsafe" // IoctlRetInt performs an ioctl operation specified by req on a device // associated with opened file descriptor fd, and returns a non-negative @@ -217,3 +215,19 @@ func IoctlKCMAttach(fd int, info KCMAttach) error { func IoctlKCMUnattach(fd int, info KCMUnattach) error { return ioctlPtr(fd, SIOCKCMUNATTACH, unsafe.Pointer(&info)) } + +// IoctlLoopGetStatus64 gets the status of the loop device associated with the +// file descriptor fd using the LOOP_GET_STATUS64 operation. +func IoctlLoopGetStatus64(fd int) (*LoopInfo64, error) { + var value LoopInfo64 + if err := ioctlPtr(fd, LOOP_GET_STATUS64, unsafe.Pointer(&value)); err != nil { + return nil, err + } + return &value, nil +} + +// IoctlLoopSetStatus64 sets the status of the loop device associated with the +// file descriptor fd using the LOOP_SET_STATUS64 operation. +func IoctlLoopSetStatus64(fd int, value *LoopInfo64) error { + return ioctlPtr(fd, LOOP_SET_STATUS64, unsafe.Pointer(value)) +} diff --git a/v2/vendor/golang.org/x/sys/unix/str.go b/v2/vendor/golang.org/x/sys/unix/str.go deleted file mode 100644 index 8ba89ed8..00000000 --- a/v2/vendor/golang.org/x/sys/unix/str.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris - -package unix - -func itoa(val int) string { // do it here rather than with fmt to avoid dependency - if val < 0 { - return "-" + uitoa(uint(-val)) - } - return uitoa(uint(val)) -} - -func uitoa(val uint) string { - var buf [32]byte // big enough for int64 - i := len(buf) - 1 - for val >= 10 { - buf[i] = byte(val%10 + '0') - i-- - val /= 10 - } - buf[i] = byte(val + '0') - return string(buf[i:]) -} diff --git a/v2/vendor/golang.org/x/sys/unix/syscall_linux.go b/v2/vendor/golang.org/x/sys/unix/syscall_linux.go index ecb0f27f..eecb58d7 100644 --- a/v2/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/v2/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -13,6 +13,7 @@ package unix import ( "encoding/binary" + "strconv" "syscall" "time" "unsafe" @@ -233,7 +234,7 @@ func Futimesat(dirfd int, path string, tv []Timeval) error { func Futimes(fd int, tv []Timeval) (err error) { // Believe it or not, this is the best we can do on Linux // (and is what glibc does). - return Utimes("/proc/self/fd/"+itoa(fd), tv) + return Utimes("/proc/self/fd/"+strconv.Itoa(fd), tv) } const ImplementsGetwd = true diff --git a/v2/vendor/modules.txt b/v2/vendor/modules.txt index a9eccb03..9c48f815 100644 --- a/v2/vendor/modules.txt +++ b/v2/vendor/modules.txt @@ -62,7 +62,7 @@ github.com/xyproto/textoutput # github.com/xyproto/vt100 v1.11.3 ## explicit; go 1.10 github.com/xyproto/vt100 -# golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64 +# golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 ## explicit; go 1.17 golang.org/x/sys/internal/unsafeheader golang.org/x/sys/unix