diff options
author | Jake Champlin <jake@gnu.space> | 2017-06-09 17:54:32 +0000 |
---|---|---|
committer | Jake Champlin <jake@gnu.space> | 2017-06-09 17:54:32 +0000 |
commit | 9b12e4fe6f3c95986f1f3ec791636c58ca7e7583 (patch) | |
tree | 38f5f12bec0e488a12f0459a7356e6b7de7d8f84 /vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/flock.go | |
parent | cec3de8a3bcaffd21dedd1bf42da4b490cae7e16 (diff) | |
download | terraform-provider-statuscake-9b12e4fe6f3c95986f1f3ec791636c58ca7e7583.tar.gz terraform-provider-statuscake-9b12e4fe6f3c95986f1f3ec791636c58ca7e7583.tar.zst terraform-provider-statuscake-9b12e4fe6f3c95986f1f3ec791636c58ca7e7583.zip |
Transfer of provider code
Diffstat (limited to 'vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/flock.go')
-rw-r--r-- | vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/flock.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/flock.go b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/flock.go new file mode 100644 index 0000000..ce67a59 --- /dev/null +++ b/vendor/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix/flock.go | |||
@@ -0,0 +1,24 @@ | |||
1 | // +build linux darwin freebsd openbsd netbsd dragonfly | ||
2 | |||
3 | // Copyright 2014 The Go Authors. All rights reserved. | ||
4 | // Use of this source code is governed by a BSD-style | ||
5 | // license that can be found in the LICENSE file. | ||
6 | |||
7 | // +build darwin dragonfly freebsd linux netbsd openbsd | ||
8 | |||
9 | package unix | ||
10 | |||
11 | import "unsafe" | ||
12 | |||
13 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux | ||
14 | // systems by flock_linux_32bit.go to be SYS_FCNTL64. | ||
15 | var fcntl64Syscall uintptr = SYS_FCNTL | ||
16 | |||
17 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. | ||
18 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { | ||
19 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) | ||
20 | if errno == 0 { | ||
21 | return nil | ||
22 | } | ||
23 | return errno | ||
24 | } | ||