From 4afe43e1a326d50296b6ad4a7ed836d4b0ae6b26 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 26 Nov 2015 21:52:05 +0100 Subject: [PATCH] debug: show LV name where dlid creation failed --- lib/misc/lvm-string.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/misc/lvm-string.c b/lib/misc/lvm-string.c index 5d6385817..605e8d52c 100644 --- a/lib/misc/lvm-string.c +++ b/lib/misc/lvm-string.c @@ -16,6 +16,7 @@ #include "lib.h" #include "lvm-string.h" #include "metadata-exported.h" +#include "display.h" #include #include @@ -211,6 +212,7 @@ char *build_dm_uuid(struct dm_pool *mem, const struct logical_volume *lv, const char *layer) { const char *lvid = lv->lvid.s; + char *dlid; if (!layer) { /* @@ -235,5 +237,9 @@ char *build_dm_uuid(struct dm_pool *mem, const struct logical_volume *lv, NULL; } - return dm_build_dm_uuid(mem, UUID_PREFIX, lvid, layer); + if (!(dlid = dm_build_dm_uuid(mem, UUID_PREFIX, lvid, layer))) + log_error("Failed to build LVM dlid for %s.", + display_lvname(lv)); + + return dlid; } -- 2.43.5