Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf beauty: Don't include uapi/linux/mount.h, use sys/mount.h instead

The tools/include/uapi/linux/mount.h file is mostly used for scrapping
defines into id->string tables, this is the only place were it is being
directly used, stop doing so.

Define MOUNT_ATTR_RELATIME and MOUNT_ATTR__ATIME if not available in the
system's headers.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+8 -1
+8 -1
tools/perf/trace/beauty/fsmount.c
··· 7 7 8 8 #include "trace/beauty/beauty.h" 9 9 #include <linux/log2.h> 10 - #include <uapi/linux/mount.h> 10 + #include <sys/mount.h> 11 + 12 + #ifndef MOUNT_ATTR__ATIME 13 + #define MOUNT_ATTR__ATIME 0x00000070 /* Setting on how atime should be updated */ 14 + #endif 15 + #ifndef MOUNT_ATTR_RELATIME 16 + #define MOUNT_ATTR_RELATIME 0x00000000 /* - Update atime relative to mtime/ctime. */ 17 + #endif 11 18 12 19 static size_t fsmount__scnprintf_attr_flags(unsigned long flags, char *bf, size_t size, bool show_prefix) 13 20 {