From 49a8c786d5fdbf79ac60f2720d4e1433146d14f4 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 12 Mar 2018 23:01:52 +0100 Subject: [PATCH] dmsetup: report close as debug Since close() failures are not causing command errors, issue error via debug log stream only. --- tools/dmsetup.c | 10 +++++----- 1 file 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, -- 2.43.5