[libvirt] [PATCH] virsh: Fix a problem of buildPoolXML

It doesn't generate "<name>" and "<format>" nodes for "<source>" even if they are explictly specified. This patch fixes it. --- tools/virsh.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index d15d206..e82ddae 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) -- 1.7.4

On 06/30/2011 03:23 AM, Osier Yang wrote:
It doesn't generate "<name>" and "<format>" nodes for "<source>" even if they are explictly specified. This patch fixes it.
s/explictly/explicitly/
--- tools/virsh.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c index d15d206..e82ddae 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) {
ACK. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

于 2011年06月30日 21:34, Eric Blake 写道:
On 06/30/2011 03:23 AM, Osier Yang wrote:
It doesn't generate "<name>" and"<format>" nodes for"<source>" even if they are explictly specified. This patch fixes it.
s/explictly/explicitly/
--- tools/virsh.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c index d15d206..e82ddae 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) {
ACK.
Thanks, applied with that typo fixed. Osier
participants (2)
-
Eric Blake
-
Osier Yang