
# HG changeset patch # User Richard Maciel <rmaciel@linux.vnet.ibm.com> # Date 1244396373 10800 # Node ID acfd07abeb2602bc0727ff29c05511748cd0a276 # Parent d733a0ec8e105c7d315ffefdbfbb900a8e24d857 Added support for BusType prop on xmlgen and xml_parse_test #2: BusType prop is available to file-based disks too Signed-off-by: Richard Maciel <rmaciel@linux.vnet.ibm.com> imported patch dbus_type_xml diff -r d733a0ec8e10 -r acfd07abeb26 libxkutil/xml_parse_test.c --- a/libxkutil/xml_parse_test.c Sun Jun 07 14:39:33 2009 -0300 +++ b/libxkutil/xml_parse_test.c Sun Jun 07 14:39:33 2009 -0300 @@ -97,6 +97,7 @@ print_value(d, "Driver", dev->dev.disk.driver); print_value(d, "Source", dev->dev.disk.source); print_value(d, "Virt Device", dev->dev.disk.virtual_dev); + print_value(d, "Bus Type", dev->dev.disk.bus_type); } static void print_dev_vcpu(struct virt_device *dev, diff -r d733a0ec8e10 -r acfd07abeb26 libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Sun Jun 07 14:39:33 2009 -0300 +++ b/libxkutil/xmlgen.c Sun Jun 07 14:39:33 2009 -0300 @@ -60,6 +60,8 @@ if (tmp == NULL) return XML_ERROR; xmlNewProp(tmp, BAD_CAST "dev", BAD_CAST dev->virtual_dev); + if (dev->bus_type) + xmlNewProp(tmp, BAD_CAST "bus", BAD_CAST dev->bus_type); if (dev->readonly) xmlNewChild(disk, NULL, BAD_CAST "readonly", NULL); @@ -90,6 +92,9 @@ if (tmp == NULL) return XML_ERROR; xmlNewProp(tmp, BAD_CAST "dev", BAD_CAST dev->virtual_dev); + if (dev->bus_type) + xmlNewProp(tmp, BAD_CAST "bus", BAD_CAST dev->bus_type); + if (dev->readonly) xmlNewChild(disk, NULL, BAD_CAST "readonly", NULL);