if (!(fp = fopen(path, "r"))) {
if (error_if_no_value)
- log_sys_error("fopen", path);
+ log_sys_debug("fopen", path);
return 0;
}
if (!fgets(buf, buf_size, fp)) {
if (error_if_no_value)
- log_sys_error("fgets", path);
+ log_sys_debug("fgets", path);
goto out;
}
/* read /sys/block/sda/device/wwid */
if (dm_snprintf(wwid_path, sizeof(wwid_path), "%sblock/%s/device/wwid",
- dm_sysfs_dir(), slave_name) < 0) {
+ dm_sysfs_dir(), slave_name) < 0) {
log_warn("Failed to create sysfs wwid path for %s", slave_name);
continue;
}
- get_sysfs_value(wwid_path, sysbuf, sizeof(sysbuf), 0);
+ if (!get_sysfs_value(wwid_path, sysbuf, sizeof(sysbuf), 0))
+ stack;
+
if (!sysbuf[0])
continue;
return wwid;
}
-
-
if (pvids_ok && devs_ok)
ret = 1;
out:
- fclose(fp);
+ if (fclose(fp))
+ log_sys_debug("fclose", _searched_file);
+
log_debug("searched_devnames %s file pvids %d %u devs %d %u search pvids %d %u devs %d %u",
ret ? "match" : "differ",
pvids_count_file, pvids_hash_file, devs_count_file, devs_hash_file,