Vendor in containers/(common, storage, image)

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2022-05-03 09:59:43 -04:00
parent b8b0e9937b
commit 3c286dd1d1
152 changed files with 9926 additions and 1403 deletions

View File

@@ -2,7 +2,6 @@ package zfs
import (
"fmt"
"strings"
"github.com/containers/storage/drivers"
"github.com/pkg/errors"
@@ -26,19 +25,10 @@ func checkRootdirFs(rootdir string) error {
}
func getMountpoint(id string) string {
maxlen := 12
// we need to preserve filesystem suffix
suffix := strings.SplitN(id, "-", 2)
if len(suffix) > 1 {
return id[:maxlen] + "-" + suffix[1]
}
return id[:maxlen]
return id
}
func detachUnmount(mountpoint string) error {
// FreeBSD doesn't have an equivalent to MNT_DETACH
return unix.Unmount(mountpoint, 0)
// FreeBSD's MNT_FORCE is roughly equivalent to MNT_DETACH
return unix.Unmount(mountpoint, unix.MNT_FORCE)
}