Changes most references of syscall to golang.org/x/sys/
Ones aren't changes include, Errno, Signal and SysProcAttr
as they haven't been implemented in /x/sys/.
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
[s390x] switch utsname from unsigned to signed
per 33267e036f
char in s390x in the /x/sys/unix package is now signed, so
change the buildtags
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: 069fdc8a083cb1663e4f86fe3fd9b9a1aebc3e54
Component: engine
28 lines
564 B
Go
28 lines
564 B
Go
package zfs
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/Sirupsen/logrus"
|
|
"github.com/docker/docker/daemon/graphdriver"
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
func checkRootdirFs(rootdir string) error {
|
|
var buf unix.Statfs_t
|
|
if err := unix.Statfs(rootdir, &buf); err != nil {
|
|
return fmt.Errorf("Failed to access '%s': %s", rootdir, err)
|
|
}
|
|
|
|
if graphdriver.FsMagic(buf.Type) != graphdriver.FsMagicZfs {
|
|
logrus.Debugf("[zfs] no zfs dataset found for rootdir '%s'", rootdir)
|
|
return graphdriver.ErrPrerequisites
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func getMountpoint(id string) string {
|
|
return id
|
|
}
|