On Wed, Jan 28, 2015 at 7:58 PM, Tuukka Tikkanen idlestat@tic0.net wrote:
Previously any directory entry in /sys/devices/system/cpu/ with the substring "cpu" within the name would be considered to be a subdirectory for a cpu. The substring should begin the name, not just appear within the name.
OK. Will apply.
But what directories do you see other than cpuX, cpuidle and cpufreq under /sys/devices/system/cpu/ ?
cpuidle and cpufreq are already filtered in the previous line. I'm curious what else are you guarding against?
Signed-off-by: Tuukka Tikkanen idlestat@tic0.net
topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/topology.c b/topology.c index ff0b6fb..c7528af 100644 --- a/topology.c +++ b/topology.c @@ -333,7 +333,7 @@ static struct cpu_topology *topo_folder_scan(char *path, folder_filter_t filter) if (filter && filter(direntp->d_name)) continue;
if (!strstr(direntp->d_name, "cpu"))
if (strncmp(direntp->d_name, "cpu", 3)) continue; ret = asprintf(&newpath, "%s/%s/%s", basedir,
-- 1.7.9.5