]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: Fix a problem of buildPoolXML
authorOsier Yang <jyang@redhat.com>
Thu, 30 Jun 2011 08:46:44 +0000 (16:46 +0800)
committerOsier Yang <jyang@redhat.com>
Thu, 30 Jun 2011 13:39:58 +0000 (21:39 +0800)
It doesn't generate "<name>" and "<format>" nodes for "<source>"
even if they are explicitly specified. This patch fixes it.

tools/virsh.c

index d15d2069bce1adc91818c1c3ee14a7a15e9d6c0d..e82ddae95c6acb74e37fc56d09d50d0ab079d2f4 100644 (file)
@@ -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)