mirror of
https://github.com/containers/skopeo.git
synced 2025-09-26 12:44:55 +00:00
Update vendor of containers/(common,storage,image)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
4
vendor/github.com/containers/storage/drivers/zfs/zfs.go
generated
vendored
4
vendor/github.com/containers/storage/drivers/zfs/zfs.go
generated
vendored
@@ -344,7 +344,7 @@ func (d *Driver) create(id, parent string, opts *graphdriver.CreateOpts) error {
|
||||
return errors.Wrap(err, "error creating zfs mount")
|
||||
}
|
||||
defer func() {
|
||||
if err := unix.Unmount(mountpoint, unix.MNT_DETACH); err != nil {
|
||||
if err := detachUnmount(mountpoint); err != nil {
|
||||
logrus.Warnf("Failed to unmount %s mount %s: %v", id, mountpoint, err)
|
||||
}
|
||||
}()
|
||||
@@ -483,7 +483,7 @@ func (d *Driver) Put(id string) error {
|
||||
|
||||
logger.Debugf(`unmount("%s")`, mountpoint)
|
||||
|
||||
if err := unix.Unmount(mountpoint, unix.MNT_DETACH); err != nil {
|
||||
if err := detachUnmount(mountpoint); err != nil {
|
||||
logger.Warnf("Failed to unmount %s mount %s: %v", id, mountpoint, err)
|
||||
}
|
||||
if err := unix.Rmdir(mountpoint); err != nil && !os.IsNotExist(err) {
|
||||
|
5
vendor/github.com/containers/storage/drivers/zfs/zfs_freebsd.go
generated
vendored
5
vendor/github.com/containers/storage/drivers/zfs/zfs_freebsd.go
generated
vendored
@@ -37,3 +37,8 @@ func getMountpoint(id string) string {
|
||||
|
||||
return id[:maxlen]
|
||||
}
|
||||
|
||||
func detachUnmount(mountpoint string) error {
|
||||
// FreeBSD doesn't have an equivalent to MNT_DETACH
|
||||
return unix.Unmount(mountpoint, 0)
|
||||
}
|
||||
|
5
vendor/github.com/containers/storage/drivers/zfs/zfs_linux.go
generated
vendored
5
vendor/github.com/containers/storage/drivers/zfs/zfs_linux.go
generated
vendored
@@ -4,6 +4,7 @@ import (
|
||||
graphdriver "github.com/containers/storage/drivers"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func checkRootdirFs(rootDir string) error {
|
||||
@@ -27,3 +28,7 @@ func checkRootdirFs(rootDir string) error {
|
||||
func getMountpoint(id string) string {
|
||||
return id
|
||||
}
|
||||
|
||||
func detachUnmount(mountpoint string) error {
|
||||
return unix.Unmount(mountpoint, unix.MNT_DETACH)
|
||||
}
|
||||
|
Reference in New Issue
Block a user