From: Eugene Syromyatnikov Date: Tue, 31 Jul 2018 12:21:32 +0000 (+0200) Subject: open.c: use __O_TMPFILE X-Git-Tag: v4.24~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=11e24ca2a4c17f57f2df2d5993db93fe971d9ed5;p=strace 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. --- 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]);