summaryrefslogtreecommitdiff
path: root/pkg/devicemapper
diff options
context:
space:
mode:
authorChristopher Jones <tophj@linux.vnet.ibm.com>2017-05-23 10:22:32 -0400
committerChristopher Jones <tophj@linux.vnet.ibm.com>2017-07-11 08:00:32 -0400
commit069fdc8a083cb1663e4f86fe3fd9b9a1aebc3e54 (patch)
tree14154f770a131119da8b66fdf9d906b50fef50df /pkg/devicemapper
parent6978a6e25a2e6063f280ec842bd0f3eae99426e1 (diff)
downloaddocker-069fdc8a083cb1663e4f86fe3fd9b9a1aebc3e54.tar.gz
[project] change syscall to /x/sys/unix|windows
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 https://github.com/golang/sys/commit/33267e036fd93fcd26ea95b7bdaf2d8306cb743c 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>
Diffstat (limited to 'pkg/devicemapper')
-rw-r--r--pkg/devicemapper/devmapper.go4
-rw-r--r--pkg/devicemapper/ioctl.go7
2 files changed, 6 insertions, 5 deletions
diff --git a/pkg/devicemapper/devmapper.go b/pkg/devicemapper/devmapper.go
index 08e0c06aad..05dda663b7 100644
--- a/pkg/devicemapper/devmapper.go
+++ b/pkg/devicemapper/devmapper.go
@@ -7,10 +7,10 @@ import (
"fmt"
"os"
"runtime"
- "syscall"
"unsafe"
"github.com/Sirupsen/logrus"
+ "golang.org/x/sys/unix"
)
// DevmapperLogger defines methods for logging with devicemapper.
@@ -449,7 +449,7 @@ func BlockDeviceDiscard(path string) error {
// Without this sometimes the remove of the device that happens after
// discard fails with EBUSY.
- syscall.Sync()
+ unix.Sync()
return nil
}
diff --git a/pkg/devicemapper/ioctl.go b/pkg/devicemapper/ioctl.go
index b745291442..50ea7c4823 100644
--- a/pkg/devicemapper/ioctl.go
+++ b/pkg/devicemapper/ioctl.go
@@ -3,13 +3,14 @@
package devicemapper
import (
- "syscall"
"unsafe"
+
+ "golang.org/x/sys/unix"
)
func ioctlBlkGetSize64(fd uintptr) (int64, error) {
var size int64
- if _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, BlkGetSize64, uintptr(unsafe.Pointer(&size))); err != 0 {
+ if _, _, err := unix.Syscall(unix.SYS_IOCTL, fd, BlkGetSize64, uintptr(unsafe.Pointer(&size))); err != 0 {
return 0, err
}
return size, nil
@@ -20,7 +21,7 @@ func ioctlBlkDiscard(fd uintptr, offset, length uint64) error {
r[0] = offset
r[1] = length
- if _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, BlkDiscard, uintptr(unsafe.Pointer(&r[0]))); err != 0 {
+ if _, _, err := unix.Syscall(unix.SYS_IOCTL, fd, BlkDiscard, uintptr(unsafe.Pointer(&r[0]))); err != 0 {
return err
}
return nil