]> xenbits.xensource.com Git - libvirt.git/commitdiff
Brown paper bag bug. I didn't preserve the
authorChris Lalancette <clalance@redhat.com>
Thu, 23 Oct 2008 13:21:01 +0000 (13:21 +0000)
committerChris Lalancette <clalance@redhat.com>
Thu, 23 Oct 2008 13:21:01 +0000 (13:21 +0000)
<sources> tags properly, and I didn't put the <source> tag into the
proper place, so I totally changed the output of the discovery XML.
Fix this up to do the right thing.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
ChangeLog
src/storage_conf.c

index 50f12fe8dd123a52e6b2cf068292bd55095d3137..0505ee4ee7fe144ae13410b781b5adf5eace09b3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Oct 23 15:20:00 CEST 2008 Chris Lalancete <clalance@redhat.com>
+       * src/storage_conf.c: brown paper bag bug.  I didn't preserve the
+       <sources> tags properly, and I didn't put the <source> tag into the
+       proper place, so I totally changed the output of the discovery XML.
+       Fix this up to do the right thing.
+
 Thu Oct 23 15:11:03 CEST 2008 Daniel Veillard <veillard@redhat.com>
 
        * include/libvirt/libvirt.h include/libvirt/libvirt.h.in
index 386cfd542b9c159beee0a49fa2c148a770a7a4f3..78647d6271053d8693888bd320a89596e1a0828f 100644 (file)
@@ -1277,15 +1277,16 @@ char *virStoragePoolSourceListFormat(virConnectPtr conn ATTRIBUTE_UNUSED,
     int i, j;
     virBuffer buf = VIR_BUFFER_INITIALIZER;
 
-    virBufferAddLit(&buf, "<source>");
+    virBufferAddLit(&buf, "<sources>");
 
     for (i = 0; i < def->nsources; i++) {
-        virBufferVSprintf(&buf, "<name>%s</name>", def->sources[i].name);
+        virBufferVSprintf(&buf, "<source><name>%s</name>", def->sources[i].name);
         for (j = 0; j < def->sources[i].ndevice; j++)
             virBufferVSprintf(&buf, "<device path='%s'/>", def->sources[i].devices[j].path);
+       virBufferAddLit(&buf, "</source>");
     }
 
-    virBufferAddLit(&buf, "</source>");
+    virBufferAddLit(&buf, "</sources>");
 
     return virBufferContentAndReset(&buf);
 }