First check path before accessing files to be sure they actually exist. This is
necessary when also informations for offline CPUs will be printed. Since we do
not necessarily know if "cpu is offline" means the same as "path does not
exist" just check for it.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
struct cpu_cache *ca = &desc->caches[i];
cpu_set_t *map;
+ if (!path_exist(_PATH_SYS_SYSTEM "/cpu/cpu%d/cache/index%d",
+ num, i))
+ continue;
if (!ca->name) {
int type, level;