summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2016-04-20 12:45:15 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2016-04-21 00:34:01 +0200
commit509b2e524795d28f68be06b862794f7f0c5c9991 (patch)
tree16f80019ba37863d530b3f34951fdb5b45afab18
parent57f468a53ed8ec425d1087ce06c90862caa19ff1 (diff)
downloadlvm2-509b2e524795d28f68be06b862794f7f0c5c9991.tar.gz
debug: move misplaced log_debug
It should log action before taking it instead of only in error path.
-rw-r--r--lib/format_text/format-text.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c
index 43ebd279b..095ae9779 100644
--- a/lib/format_text/format-text.c
+++ b/lib/format_text/format-text.c
@@ -985,8 +985,8 @@ static int _vg_write_file(struct format_instance *fid __attribute__((unused)),
if (lvm_fclose(fp, tc->path_edit))
return_0;
+ log_debug_metadata("Renaming %s to %s", temp_file, tc->path_edit);
if (rename(temp_file, tc->path_edit)) {
- log_debug_metadata("Renaming %s to %s", temp_file, tc->path_edit);
log_error("%s: rename to %s failed: %s", temp_file,
tc->path_edit, strerror(errno));
return 0;