summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2018-03-12 23:01:52 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2018-03-13 12:58:57 +0100
commit49a8c786d5fdbf79ac60f2720d4e1433146d14f4 (patch)
treed3a66fa50c7b498c9ca3babc8d75832b523000e2
parent06c1f71897273558b5ffe607ceaee6d51576b861 (diff)
downloadlvm2-49a8c786d5fdbf79ac60f2720d4e1433146d14f4.tar.gz
dmsetup: report close as debug
Since close() failures are not causing command errors, issue error via debug log stream only.
-rw-r--r--tools/dmsetup.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/dmsetup.c b/tools/dmsetup.c
index c866cd63d..0d5b71377 100644
--- a/tools/dmsetup.c
+++ b/tools/dmsetup.c
@@ -5437,7 +5437,7 @@ static int _stats_create_file(CMD_ARGS)
}
if (close(fd))
- log_error("Error closing %s.", abspath);
+ log_sys_debug("close", abspath);
fd = -1;
@@ -5466,7 +5466,7 @@ bad:
dm_free(bounds);
if ((fd > -1) && close(fd))
- log_error("Error closing %s", path);
+ log_sys_debug("close", path);
if (dms)
dm_stats_destroy(dms);
@@ -6065,7 +6065,7 @@ static int _stats_update_file(CMD_ARGS)
out:
if (close(fd))
- log_error("Error closing %s", abspath);
+ log_sys_debug("close", abspath);
dm_free(regions);
dm_free(abspath);
@@ -6076,7 +6076,7 @@ bad:
dm_free(abspath);
if ((fd > -1) && close(fd))
- log_error("Error closing %s", path);
+ log_sys_debug("close", path);
dm_stats_destroy(dms);
@@ -6614,7 +6614,7 @@ bad:
if (fd > -1 && close(fd))
log_sys_error("close", file);
- return_0;
+ return 0;
}
static int _process_losetup_switches(const char *base, int *argcp, char ***argvp,