summaryrefslogtreecommitdiffhomepage
path: root/pkg/abi/linux/fcntl.go
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2019-07-09 16:16:46 -0700
committergVisor bot <gvisor-bot@google.com>2019-07-09 16:18:02 -0700
commitcceef9d2cfbf72a7ae4feac2e53e46179c33155d (patch)
treecefb01757e2363d09851f576a7a160bb2f4797e1 /pkg/abi/linux/fcntl.go
parent6db3f8d54c0225e6b6c3d8eef30b4b61498848b7 (diff)
Cleanup straggling syscall dependencies.
PiperOrigin-RevId: 257293198
Diffstat (limited to 'pkg/abi/linux/fcntl.go')
-rw-r--r--pkg/abi/linux/fcntl.go36
1 files changed, 27 insertions, 9 deletions
diff --git a/pkg/abi/linux/fcntl.go b/pkg/abi/linux/fcntl.go
index 30902a8ca..f78315ebf 100644
--- a/pkg/abi/linux/fcntl.go
+++ b/pkg/abi/linux/fcntl.go
@@ -16,21 +16,39 @@ package linux
// Commands from linux/fcntl.h.
const (
- F_DUPFD = 0
- F_GETFD = 1
- F_GETFL = 3
- F_GETOWN = 9
- F_SETFD = 2
- F_SETFL = 4
- F_SETLK = 6
- F_SETLKW = 7
- F_SETOWN = 8
+ F_DUPFD = 0x0
+ F_GETFD = 0x1
+ F_SETFD = 0x2
+ F_GETFL = 0x3
+ F_SETFL = 0x4
+ F_SETLK = 0x6
+ F_SETLKW = 0x7
+ F_SETOWN = 0x8
+ F_GETOWN = 0x9
F_DUPFD_CLOEXEC = 1024 + 6
F_SETPIPE_SZ = 1024 + 7
F_GETPIPE_SZ = 1024 + 8
)
+// Commands for F_SETLK.
+const (
+ F_RDLCK = 0x0
+ F_WRLCK = 0x1
+ F_UNLCK = 0x2
+)
+
// Flags for fcntl.
const (
FD_CLOEXEC = 00000001
)
+
+// Lock structure for F_SETLK.
+type Flock struct {
+ Type int16
+ Whence int16
+ _ [4]byte
+ Start int64
+ Len int64
+ Pid int32
+ _ [4]byte
+}