summaryrefslogtreecommitdiff
path: root/daemons/lvmlockd/lvmlockd-sanlock.c
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2018-11-02 22:00:26 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2018-11-05 17:25:11 +0100
commit9d9979963ffa5ec72a188e123a89eeea8ea666c5 (patch)
tree64d0afc4eba6ac6b40567f259a7d354af71ca399 /daemons/lvmlockd/lvmlockd-sanlock.c
parentaa8b2d6a0feb91bb5ea4364cdc53a00dfa233dca (diff)
downloadlvm2-9d9979963ffa5ec72a188e123a89eeea8ea666c5.tar.gz
debug: tracing fclose failure
Using log_debug (not returning error code) to trace possible failure of fclose().
Diffstat (limited to 'daemons/lvmlockd/lvmlockd-sanlock.c')
-rw-r--r--daemons/lvmlockd/lvmlockd-sanlock.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/daemons/lvmlockd/lvmlockd-sanlock.c b/daemons/lvmlockd/lvmlockd-sanlock.c
index d22d009b0..993f2f5e4 100644
--- a/daemons/lvmlockd/lvmlockd-sanlock.c
+++ b/daemons/lvmlockd/lvmlockd-sanlock.c
@@ -307,7 +307,8 @@ static int read_host_id_file(void)
}
}
if (fclose(file))
- log_error("failed to close host id file %s", daemon_host_id_file);
+ log_debug("Failed to fclose host id file %s (%s).",
+ daemon_host_id_file, strerror(errno));
out:
log_debug("host_id %d from %s", host_id, daemon_host_id_file);
return host_id;
@@ -365,7 +366,9 @@ static void _read_sysfs_size(dev_t devno, const char *name, unsigned int *val)
if (strlen(buf))
*val = atoi(buf);
out:
- fclose(fp);
+ if (fclose(fp))
+ log_debug("Failed to fclose host id file %s (%s).", path, strerror(errno));
+
}
/* Select sector/align size for a new VG based on what the device reports for