master - debug: show LV name where dlid creation failed
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=82ec3e5e93f5017d7c9a83197e34f05e783fa7bf Commit: 82ec3e5e93f5017d7c9a83197e34f05e783fa7bf Parent: 922fccc6560706f5026d59e383b694f9d7f85945 Author: Zdenek Kabelac <[email protected]> AuthorDate: Thu Nov 26 21:20:33 2015 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Thu Nov 26 21:20:33 2015 +0100
debug: show LV name where dlid creation failed
--- lib/misc/lvm-string.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
lib/misc/lvm-string.c +6 -1
@@ -211,6 +211,7 @@ char *build_dm_uuid(struct dm_pool *mem, const struct logical_volume *lv, const char *layer) {const char *lvid = lv->lvid.s; +const char *dlid;if (!layer) {/*
@@ -235,5 +236,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; }