Skip to contentSkip to conversation

main - wipe: reformat message for failure case

PATCH Zdenek Kabelac 1 participant 1 message Feb 1, 2021

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=3acf6040b558a121d918a478859ae0c97a679047
Commit:        3acf6040b558a121d918a478859ae0c97a679047
Parent:        8f5695fa71e0b293e774cfbaf7af7985896cd47a
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Fri Jan 22 19:21:55 2021 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Mon Feb 1 12:13:49 2021 +0100

wipe: reformat message for failure case

Use the same error message layout to match BLKZEROUT look. Makes testing easier.

---
 lib/metadata/lv_manip.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
lib/metadata/lv_manip.c +3 -3
index c82038269..d101fa582 100644
@@ -7785,10 +7785,10 @@ retry_with_dev_set:
 #endif
 		if (!dev_set_bytes(dev, UINT64_C(0), (size_t) zero_sectors << SECTOR_SHIFT, wp.zero_value)) {
 			sigint_restore();
-			log_error("%s %s of logical volume %s with value %d.",
+			log_error("%s logical volume %s with value %d and size %s.",
 				  sigint_caught() ? "Interrupted initialization" : "Failed to initialize",
-				  display_size(lv->vg->cmd, zero_sectors),
-				  display_lvname(lv), wp.zero_value);
+				  display_lvname(lv), wp.zero_value,
+				  display_size(lv->vg->cmd, zero_sectors));
 			return 0;
 		}
 	}