lscss: fix scanning for defunct devices

util_scandir doesn't work with "/" at the end of the format string.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Sebastian Ott
2018-03-16 16:29:36 +01:00
committed by Jan Höppner
parent 4ff7aeff39
commit 33a17df9fc

View File

@@ -717,7 +717,7 @@ static void print_subchannels_of_type(enum sch_type type_requested,
if (!cmd.opt_devrange && cmd.rng_count > 0)
return;
path = util_path_sysfs("devices");
count = util_scandir(&de_vec, alphasort, path, "css.*/");
count = util_scandir(&de_vec, alphasort, path, "css.*");
free(path);
for (i = 0; i < count; i++) {
path = util_path_sysfs("devices/%s/defunct", de_vec[i]->d_name);