mirror of
https://github.com/containers/skopeo.git
synced 2025-09-26 12:44:55 +00:00
Update to image-spec v1.0.0 and revendor
This commit is contained in:
5
vendor/github.com/containers/storage/drivers/zfs/zfs.go
generated
vendored
5
vendor/github.com/containers/storage/drivers/zfs/zfs.go
generated
vendored
@@ -20,6 +20,7 @@ import (
|
||||
"github.com/containers/storage/pkg/parsers"
|
||||
zfs "github.com/mistifyio/go-zfs"
|
||||
"github.com/opencontainers/selinux/go-selinux/label"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
type zfsOptions struct {
|
||||
@@ -47,13 +48,13 @@ func Init(base string, opt []string, uidMaps, gidMaps []idtools.IDMap) (graphdri
|
||||
|
||||
if _, err := exec.LookPath("zfs"); err != nil {
|
||||
logrus.Debugf("[zfs] zfs command is not available: %v", err)
|
||||
return nil, graphdriver.ErrPrerequisites
|
||||
return nil, errors.Wrap(graphdriver.ErrPrerequisites, "the 'zfs' command is not available")
|
||||
}
|
||||
|
||||
file, err := os.OpenFile("/dev/zfs", os.O_RDWR, 600)
|
||||
if err != nil {
|
||||
logrus.Debugf("[zfs] cannot open /dev/zfs: %v", err)
|
||||
return nil, graphdriver.ErrPrerequisites
|
||||
return nil, errors.Wrapf(graphdriver.ErrPrerequisites, "could not open /dev/zfs: %v", err)
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
|
3
vendor/github.com/containers/storage/drivers/zfs/zfs_freebsd.go
generated
vendored
3
vendor/github.com/containers/storage/drivers/zfs/zfs_freebsd.go
generated
vendored
@@ -7,6 +7,7 @@ import (
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/containers/storage/drivers"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
func checkRootdirFs(rootdir string) error {
|
||||
@@ -18,7 +19,7 @@ func checkRootdirFs(rootdir string) error {
|
||||
// on FreeBSD buf.Fstypename contains ['z', 'f', 's', 0 ... ]
|
||||
if (buf.Fstypename[0] != 122) || (buf.Fstypename[1] != 102) || (buf.Fstypename[2] != 115) || (buf.Fstypename[3] != 0) {
|
||||
logrus.Debugf("[zfs] no zfs dataset found for rootdir '%s'", rootdir)
|
||||
return graphdriver.ErrPrerequisites
|
||||
return errors.Wrapf(graphdriver.ErrPrerequisites, "no zfs dataset found for rootdir '%s'", rootdir)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
3
vendor/github.com/containers/storage/drivers/zfs/zfs_linux.go
generated
vendored
3
vendor/github.com/containers/storage/drivers/zfs/zfs_linux.go
generated
vendored
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/containers/storage/drivers"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
func checkRootdirFs(rootdir string) error {
|
||||
@@ -16,7 +17,7 @@ func checkRootdirFs(rootdir string) error {
|
||||
|
||||
if graphdriver.FsMagic(buf.Type) != graphdriver.FsMagicZfs {
|
||||
logrus.Debugf("[zfs] no zfs dataset found for rootdir '%s'", rootdir)
|
||||
return graphdriver.ErrPrerequisites
|
||||
return errors.Wrapf(graphdriver.ErrPrerequisites, "no zfs dataset found for rootdir '%s'", rootdir)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
3
vendor/github.com/containers/storage/drivers/zfs/zfs_solaris.go
generated
vendored
3
vendor/github.com/containers/storage/drivers/zfs/zfs_solaris.go
generated
vendored
@@ -22,6 +22,7 @@ import (
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
"github.com/containers/storage/drivers"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
func checkRootdirFs(rootdir string) error {
|
||||
@@ -34,7 +35,7 @@ func checkRootdirFs(rootdir string) error {
|
||||
(buf.f_basetype[3] != 0) {
|
||||
log.Debugf("[zfs] no zfs dataset found for rootdir '%s'", rootdir)
|
||||
C.free(unsafe.Pointer(buf))
|
||||
return graphdriver.ErrPrerequisites
|
||||
return errors.Wrapf(graphdriver.ErrPrerequisites, "no zfs dataset found for rootdir '%s'", rootdir)
|
||||
}
|
||||
|
||||
C.free(unsafe.Pointer(buf))
|
||||
|
Reference in New Issue
Block a user