Make some of the fcntl flags arch specific..

Some of the flags in the file system related system call
are architecture specific(O_NOFOLLOW/O_DIRECT..). Ref to
the fcntl.h file in the Linux src codes.

Signed-off-by: Haibo Xu <haibo.xu@arm.com>
Change-Id: I354d988073bfd0c9ff5371d4e0be9da2b8fd019f
This commit is contained in:
Haibo Xu
2020-01-06 06:11:07 +00:00
parent 83ab47e87b
commit de0d127ae6
3 changed files with 33 additions and 21 deletions
+17 -21
View File
@@ -24,27 +24,23 @@ import (
// Constants for open(2).
const (
O_ACCMODE = 000000003
O_RDONLY = 000000000
O_WRONLY = 000000001
O_RDWR = 000000002
O_CREAT = 000000100
O_EXCL = 000000200
O_NOCTTY = 000000400
O_TRUNC = 000001000
O_APPEND = 000002000
O_NONBLOCK = 000004000
O_DSYNC = 000010000
O_ASYNC = 000020000
O_DIRECT = 000040000
O_LARGEFILE = 000100000
O_DIRECTORY = 000200000
O_NOFOLLOW = 000400000
O_NOATIME = 001000000
O_CLOEXEC = 002000000
O_SYNC = 004000000 // __O_SYNC in Linux
O_PATH = 010000000
O_TMPFILE = 020000000 // __O_TMPFILE in Linux
O_ACCMODE = 000000003
O_RDONLY = 000000000
O_WRONLY = 000000001
O_RDWR = 000000002
O_CREAT = 000000100
O_EXCL = 000000200
O_NOCTTY = 000000400
O_TRUNC = 000001000
O_APPEND = 000002000
O_NONBLOCK = 000004000
O_DSYNC = 000010000
O_ASYNC = 000020000
O_NOATIME = 001000000
O_CLOEXEC = 002000000
O_SYNC = 004000000 // __O_SYNC in Linux
O_PATH = 010000000
O_TMPFILE = 020000000 // __O_TMPFILE in Linux
)
// Constants for fstatat(2).
+8
View File
@@ -14,6 +14,14 @@
package linux
// Constants for open(2).
const (
O_DIRECT = 000040000
O_LARGEFILE = 000100000
O_DIRECTORY = 000200000
O_NOFOLLOW = 000400000
)
// Stat represents struct stat.
type Stat struct {
Dev uint64
+8
View File
@@ -14,6 +14,14 @@
package linux
// Constants for open(2).
const (
O_DIRECTORY = 000040000
O_NOFOLLOW = 000100000
O_DIRECT = 000200000
O_LARGEFILE = 000400000
)
// Stat represents struct stat.
type Stat struct {
Dev uint64