vendor: containerd/fifo f15a3290365b9d2627d189e619ab4008e0069caf

full diff: bda0ff6ed7...f15a329036

- add go.mod
- replace "golang.org/x/net/context"

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2020-05-11 23:11:33 +02:00
parent c5078a5b72
commit d9d1d5b624
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
6 changed files with 24 additions and 12 deletions

View File

@ -5,7 +5,7 @@ github.com/containerd/btrfs 153935315f4ab9be5bf03650a134
github.com/containerd/cgroups b4448137398923af7f4918b8b2ad8249172ca7a6 github.com/containerd/cgroups b4448137398923af7f4918b8b2ad8249172ca7a6
github.com/containerd/console v1.0.0 github.com/containerd/console v1.0.0
github.com/containerd/continuity d3ef23f19fbb106bb73ffde425d07a9187e30745 github.com/containerd/continuity d3ef23f19fbb106bb73ffde425d07a9187e30745
github.com/containerd/fifo bda0ff6ed73c67bfb5e62bc9c697f146b7fd7f13 github.com/containerd/fifo f15a3290365b9d2627d189e619ab4008e0069caf
github.com/containerd/go-runc a5c2862aed5e6358b305b0e16bfce58e0549b1cd github.com/containerd/go-runc a5c2862aed5e6358b305b0e16bfce58e0549b1cd
github.com/containerd/ttrpc v1.0.1 github.com/containerd/ttrpc v1.0.1
github.com/containerd/typeurl v1.0.1 github.com/containerd/typeurl v1.0.1

View File

@ -17,6 +17,7 @@
package fifo package fifo
import ( import (
"context"
"io" "io"
"os" "os"
"runtime" "runtime"
@ -24,7 +25,6 @@ import (
"syscall" "syscall"
"github.com/pkg/errors" "github.com/pkg/errors"
"golang.org/x/net/context"
) )
type fifo struct { type fifo struct {

9
vendor/github.com/containerd/fifo/go.mod generated vendored Normal file
View File

@ -0,0 +1,9 @@
module github.com/containerd/fifo
go 1.13
require (
github.com/pkg/errors v0.8.1
github.com/stretchr/testify v1.4.0
golang.org/x/sys v0.0.0-20191210023423-ac6580df4449
)

View File

@ -27,6 +27,7 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
) )
//nolint:golint
const O_PATH = 010000000 const O_PATH = 010000000
type handle struct { type handle struct {
@ -56,6 +57,7 @@ func getHandle(fn string) (*handle, error) {
h := &handle{ h := &handle{
f: f, f: f,
name: fn, name: fn,
//nolint:unconvert
dev: uint64(stat.Dev), dev: uint64(stat.Dev),
ino: stat.Ino, ino: stat.Ino,
fd: fd, fd: fd,
@ -83,6 +85,7 @@ func (h *handle) Path() (string, error) {
if err := syscall.Stat(h.procPath(), &stat); err != nil { if err := syscall.Stat(h.procPath(), &stat); err != nil {
return "", errors.Wrapf(err, "path %v could not be statted", h.procPath()) return "", errors.Wrapf(err, "path %v could not be statted", h.procPath())
} }
//nolint:unconvert
if uint64(stat.Dev) != h.dev || stat.Ino != h.ino { if uint64(stat.Dev) != h.dev || stat.Ino != h.ino {
return "", errors.Errorf("failed to verify handle %v/%v %v/%v", stat.Dev, h.dev, stat.Ino, h.ino) return "", errors.Errorf("failed to verify handle %v/%v %v/%v", stat.Dev, h.dev, stat.Ino, h.ino)
} }

View File

@ -23,7 +23,7 @@ import (
) )
// SyscallConn provides raw access to the fifo's underlying filedescrptor. // SyscallConn provides raw access to the fifo's underlying filedescrptor.
// See syscall.Conn for guarentees provided by this interface. // See syscall.Conn for guarantees provided by this interface.
func (f *fifo) SyscallConn() (syscall.RawConn, error) { func (f *fifo) SyscallConn() (syscall.RawConn, error) {
// deterministic check for closed // deterministic check for closed
select { select {