From 509b2e524795d28f68be06b862794f7f0c5c9991 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Wed, 20 Apr 2016 12:45:15 +0200 Subject: [PATCH] debug: move misplaced log_debug It should log action before taking it instead of only in error path. --- lib/format_text/format-text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;