open.c: use __O_TMPFILE

As it is the flag kernel actually checks against,
and it is now guaranteed to have a fallback definition.

* open.c (STRACE_O_TMPFILE): Remove.
(decode_open): Use __O_TMPFILE instead of STRACE_O_TMPFILE.
This commit is contained in:
Eugene Syromyatnikov 2018-07-31 14:21:32 +02:00 committed by Dmitry V. Levin
parent f22adb0c7c
commit 11e24ca2a4

9
open.c
View File

@ -117,13 +117,6 @@ tprint_open_modes(unsigned int flags)
XLAT_STYLE_DEFAULT);
}
#ifdef O_TMPFILE
/* The kernel & C libraries often inline O_DIRECTORY. */
# define STRACE_O_TMPFILE (O_TMPFILE & ~O_DIRECTORY)
#else /* !O_TMPFILE */
# define STRACE_O_TMPFILE 0
#endif
static int
decode_open(struct tcb *tcp, int offset)
{
@ -131,7 +124,7 @@ decode_open(struct tcb *tcp, int offset)
tprints(", ");
/* flags */
tprint_open_modes(tcp->u_arg[offset + 1]);
if (tcp->u_arg[offset + 1] & (O_CREAT | STRACE_O_TMPFILE)) {
if (tcp->u_arg[offset + 1] & (O_CREAT | __O_TMPFILE)) {
/* mode */
tprints(", ");
print_numeric_umode_t(tcp->u_arg[offset + 2]);