[PATCH 17/86] perf trace beauty open flags: Support O_TMPFILE and O_NOFOLLOW
From: Arnaldo Carvalho de Melo
Date: Wed Jul 19 2017 - 10:31:52 EST
From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
The open syscall flags beautifier wasn't considering those flags, fix
it.
Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Wang Nan <wangnan0@xxxxxxxxxx>
Link: http://lkml.kernel.org/n/tip-ukzoldh4arrl8x2uwjafd22h@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/trace/beauty/open_flags.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/perf/trace/beauty/open_flags.c b/tools/perf/trace/beauty/open_flags.c
index b3c7f1155d80..5fb57bed7ea2 100644
--- a/tools/perf/trace/beauty/open_flags.c
+++ b/tools/perf/trace/beauty/open_flags.c
@@ -14,6 +14,10 @@
#define O_NOATIME 01000000
#endif
+#ifndef O_TMPFILE
+#define O_TMPFILE 020000000
+#endif
+
size_t open__scnprintf_flags(unsigned long flags, char *bf, size_t size)
{
int printed = 0;
@@ -34,6 +38,8 @@ size_t open__scnprintf_flags(unsigned long flags, char *bf, size_t size)
P_FLAG(DIRECTORY);
P_FLAG(EXCL);
P_FLAG(LARGEFILE);
+ P_FLAG(NOFOLLOW);
+ P_FLAG(TMPFILE);
P_FLAG(NOATIME);
P_FLAG(NOCTTY);
#ifdef O_NONBLOCK
--
2.9.4