summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOsier Yang <jyang@redhat.com>2011-06-30 16:46:44 +0800
committerOsier Yang <jyang@redhat.com>2011-06-30 21:39:58 +0800
commite67bc20778450fcc67c85bc43c45f1c7104d6cb9 (patch)
tree5b82715c3f7310f9cc17257df678219cf231b859
parentlock qemu_driver early in qemuGetSchedulerParametersFlags() (diff)
downloadlibvirt-e67bc20778450fcc67c85bc43c45f1c7104d6cb9.tar.gz
libvirt-e67bc20778450fcc67c85bc43c45f1c7104d6cb9.tar.bz2
libvirt-e67bc20778450fcc67c85bc43c45f1c7104d6cb9.zip
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.
-rw-r--r--tools/virsh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/virsh.c b/tools/virsh.c
index d15d2069b..e82ddae95 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -6372,7 +6372,7 @@ static int buildPoolXML(const vshCmd *cmd, const char **retname, char **xml) {
virBufferAsprintf(&buf, "<pool type='%s'>\n", type);
virBufferAsprintf(&buf, " <name>%s</name>\n", name);
- if (srcHost || srcPath || srcDev) {
+ if (srcHost || srcPath || srcDev || srcFormat || srcName) {
virBufferAddLit(&buf, " <source>\n");
if (srcHost)