mirror of
https://github.com/containers/skopeo.git
synced 2025-09-10 11:09:47 +00:00
Run (make vendor) for the first time.
This primarily adds vendor/github.com/containers/image/docs/ , but also updates other dependencies that are not pinned to a specific commit.
This commit is contained in:
23
vendor/golang.org/x/sys/unix/syscall_unix.go
generated
vendored
23
vendor/golang.org/x/sys/unix/syscall_unix.go
generated
vendored
@@ -9,6 +9,7 @@ package unix
|
||||
import (
|
||||
"bytes"
|
||||
"runtime"
|
||||
"sort"
|
||||
"sync"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
@@ -51,6 +52,28 @@ func errnoErr(e syscall.Errno) error {
|
||||
return e
|
||||
}
|
||||
|
||||
// ErrnoName returns the error name for error number e.
|
||||
func ErrnoName(e syscall.Errno) string {
|
||||
i := sort.Search(len(errorList), func(i int) bool {
|
||||
return errorList[i].num >= e
|
||||
})
|
||||
if i < len(errorList) && errorList[i].num == e {
|
||||
return errorList[i].name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// SignalName returns the signal name for signal number s.
|
||||
func SignalName(s syscall.Signal) string {
|
||||
i := sort.Search(len(signalList), func(i int) bool {
|
||||
return signalList[i].num >= s
|
||||
})
|
||||
if i < len(signalList) && signalList[i].num == s {
|
||||
return signalList[i].name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// clen returns the index of the first NULL byte in n or len(n) if n contains no NULL byte.
|
||||
func clen(n []byte) int {
|
||||
i := bytes.IndexByte(n, 0)
|
||||
|
Reference in New Issue
Block a user