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:
Osier Yang 2011-06-30 16:46:44 +08:00
parent cd13dbb147
commit e67bc20778

View 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)