diff options
author | Nicolas Cavallari <nicolas.cavallari@green-communications.fr> | 2021-04-07 19:08:23 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2021-04-09 05:56:24 +0200 |
commit | 221f2898b9140b4cc103d2c485061023706c1fcf (patch) | |
tree | 89ecaeda872ea2074d05b5941e20575d0b9238e1 /libc/sysdeps/linux/hppa/bits/fcntl.h | |
parent | 2bf4991c4dd7b50b74656011dea9c40464ff390c (diff) |
open: Add support for O_TMPFILE
Since Linux 3.11, O_TMPFILE allows to create unnamed files that can be
linked later on. It is internally defined as (O_TMPFILE | O_DIRECTORY)
to make it fail on old kernels.
Copying definitions from glibc for O_TMPFILE is not enough to support
O_TMPFILE; The open() wrapper also need to pass the mode when the flag
contains O_TMPFILE, otherwise, it will pass mode 000 which will succeed
but yield unexpected results.
openat() is curiously not affected since it passes the mode
unconditionally..
Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
Diffstat (limited to 'libc/sysdeps/linux/hppa/bits/fcntl.h')
-rw-r--r-- | libc/sysdeps/linux/hppa/bits/fcntl.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/hppa/bits/fcntl.h b/libc/sysdeps/linux/hppa/bits/fcntl.h index a355737d0..4ce76ce5f 100644 --- a/libc/sysdeps/linux/hppa/bits/fcntl.h +++ b/libc/sysdeps/linux/hppa/bits/fcntl.h @@ -53,6 +53,7 @@ # define O_DIRECT 00040000 /* Direct disk access. */ # define O_NOATIME 04000000 /* Do not set atime. */ # define O_PATH 020000000 /* Resolve pathname but do not open file. */ +# define O_TMPFILE 040010000 /* Atomically create nameless file. */ #endif #ifdef __USE_LARGEFILE64 |