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.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
This commit is contained in:
Chris Lalancette 2008-10-23 13:21:01 +00:00
parent 1509b8027f
commit c402724354
2 changed files with 10 additions and 3 deletions

View File

@ -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

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