mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 05:25:18 +00:00
virsh: Fix a problem of buildPoolXML
It doesn't generate "<name>" and "<format>" nodes for "<source>" even if they are explicitly specified. This patch fixes it.
This commit is contained in:
parent
cd13dbb147
commit
e67bc20778
@ -6372,7 +6372,7 @@ static int buildPoolXML(const vshCmd *cmd, const char **retname, char **xml) {
|
|||||||
|
|
||||||
virBufferAsprintf(&buf, "<pool type='%s'>\n", type);
|
virBufferAsprintf(&buf, "<pool type='%s'>\n", type);
|
||||||
virBufferAsprintf(&buf, " <name>%s</name>\n", name);
|
virBufferAsprintf(&buf, " <name>%s</name>\n", name);
|
||||||
if (srcHost || srcPath || srcDev) {
|
if (srcHost || srcPath || srcDev || srcFormat || srcName) {
|
||||||
virBufferAddLit(&buf, " <source>\n");
|
virBufferAddLit(&buf, " <source>\n");
|
||||||
|
|
||||||
if (srcHost)
|
if (srcHost)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user