lkml.org 
[lkml]   [2019]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/5] perf data: Correctly identify directory data files
Date
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>
---
tools/perf/util/data.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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;
--
2.17.1
\
 
 \ /
  Last update: 2019-10-04 10:33    [W:0.155 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site