From 11e24ca2a4c17f57f2df2d5993db93fe971d9ed5 Mon Sep 17 00:00:00 2001 From: Eugene Syromyatnikov Date: Tue, 31 Jul 2018 14:21:32 +0200 Subject: [PATCH] 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. --- open.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/open.c b/open.c index fde21ccc..883136b6 100644 --- a/open.c +++ b/open.c @@ -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]); -- 2.40.0