Return the effective storage nodename if the format layer is not
present.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_block.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 7137604e36..b7f16b43ae 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -97,7 +97,10 @@ qemuBlockStorageSourceSetFormatNodename(virStorageSource *src,
const char *
qemuBlockStorageSourceGetEffectiveNodename(virStorageSource *src)
{
- return src->nodenameformat;
+ if (src->nodenameformat)
+ return src->nodenameformat;
+
+ return qemuBlockStorageSourceGetEffectiveStorageNodename(src);
}
--
2.42.0