diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2015-11-26 21:52:05 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2015-11-26 21:52:05 +0100 |
commit | 4afe43e1a326d50296b6ad4a7ed836d4b0ae6b26 (patch) | |
tree | 62c83b67dc9419c0c29c53151950a9f55d8d1776 | |
parent | 922fccc6560706f5026d59e383b694f9d7f85945 (diff) | |
download | lvm2-4afe43e1a326d50296b6ad4a7ed836d4b0ae6b26.tar.gz |
debug: show LV name where dlid creation failed
-rw-r--r-- | lib/misc/lvm-string.c | 8 |
1 files changed, 7 insertions, 1 deletions
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 <ctype.h> #include <stdarg.h> @@ -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; } |