From: Osier Yang Date: Thu, 30 Jun 2011 08:46:44 +0000 (+0800) Subject: virsh: Fix a problem of buildPoolXML X-Git-Tag: v0.9.3~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e67bc20778450fcc67c85bc43c45f1c7104d6cb9;p=thirdparty%2Flibvirt.git virsh: Fix a problem of buildPoolXML It doesn't generate "" and "" nodes for "" even if they are explicitly specified. This patch fixes it. --- diff --git a/tools/virsh.c b/tools/virsh.c index d15d2069bc..e82ddae95c 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, "\n", type); virBufferAsprintf(&buf, " %s\n", name); - if (srcHost || srcPath || srcDev) { + if (srcHost || srcPath || srcDev || srcFormat || srcName) { virBufferAddLit(&buf, " \n"); if (srcHost)