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:
Miloslav Trmač
2018-05-19 04:24:17 +02:00
parent 05e38e127e
commit 14ea9f8bfd
78 changed files with 13366 additions and 4383 deletions

View File

@@ -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)