summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/data.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2019-10-04 10:31:17 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-11-06 19:43:05 +0100
commit490e6db09a9035d7b40a328a2a004ef70b6bdee6 (patch)
tree986b5682a1995d17191981977972a08a3d554711 /tools/perf/util/data.c
parentperf/core: Optimize perf_init_event() for TYPE_SOFTWARE (diff)
downloadlinux-490e6db09a9035d7b40a328a2a004ef70b6bdee6.tar.xz
linux-490e6db09a9035d7b40a328a2a004ef70b6bdee6.zip
perf data: Correctly identify directory data files
In order to rename the "header" file to "data" without conflicting, correctly identify the non-header files as starting with "data." Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Jiri Olsa <jolsa@kernel.org> Link: http://lore.kernel.org/lkml/20191004083121.12182-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to '')
-rw-r--r--tools/perf/util/data.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/data.c b/tools/perf/util/data.c
index 88fba2ba549f..8993253c5564 100644
--- a/tools/perf/util/data.c
+++ b/tools/perf/util/data.c
@@ -96,7 +96,7 @@ int perf_data__open_dir(struct perf_data *data)
if (stat(path, &st))
continue;
- if (!S_ISREG(st.st_mode) || strncmp(dent->d_name, "data", 4))
+ if (!S_ISREG(st.st_mode) || strncmp(dent->d_name, "data.", 5))
continue;
ret = -ENOMEM;