From 2793f7ac5f96b474decfff68cfde86bb5c2ed0a4 Mon Sep 17 00:00:00 2001 From: Justine Olshan Date: Fri, 27 Jul 2018 12:26:42 -0700 Subject: Added the O_LARGEFILE flag. This flag will always be true for gVisor files. PiperOrigin-RevId: 206355963 Change-Id: I2f03d2412e2609042df43b06d1318cba674574d0 --- pkg/abi/linux/fcntl.go | 5 +++++ pkg/abi/linux/file.go | 16 +++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) (limited to 'pkg/abi/linux') diff --git a/pkg/abi/linux/fcntl.go b/pkg/abi/linux/fcntl.go index f5dbe5199..2a5ad6ed7 100644 --- a/pkg/abi/linux/fcntl.go +++ b/pkg/abi/linux/fcntl.go @@ -27,3 +27,8 @@ const ( F_SETLKW = 7 F_SETOWN = 8 ) + +// Flags for fcntl. +const ( + FD_CLOEXEC = 00000001 +) diff --git a/pkg/abi/linux/file.go b/pkg/abi/linux/file.go index 44672647b..f2b7e26ca 100644 --- a/pkg/abi/linux/file.go +++ b/pkg/abi/linux/file.go @@ -23,9 +23,19 @@ import ( // Constants for open(2). const ( - O_NONBLOCK = 00004000 - O_CLOEXEC = 02000000 - O_PATH = 010000000 + O_ACCMODE = 00000003 + O_RDONLY = 00000000 + O_WRONLY = 00000001 + O_RDWR = 00000002 + O_APPEND = 00002000 + O_NONBLOCK = 00004000 + O_ASYNC = 00020000 + O_DIRECT = 00040000 + O_LARGEFILE = 00100000 + O_DIRECTORY = 00200000 + O_CLOEXEC = 02000000 + O_SYNC = 04010000 + O_PATH = 010000000 ) // Constants for fstatat(2). -- cgit v1.2.3