Signed-off-by: Xu Wang <gesaint(a)linux.vnet.ibm.com>
---
libxkutil/xmlgen.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/libxkutil/xmlgen.c b/libxkutil/xmlgen.c
index dab4bcd..292717d 100644
--- a/libxkutil/xmlgen.c
+++ b/libxkutil/xmlgen.c
@@ -1741,6 +1741,24 @@ static char *tree_to_xml(xmlNodePtr root)
return xml;
}
+static const char *unknown_xml(xmlNodePtr root, struct domain *dominfo)
+{
+ int i;
+
+ CU_DEBUG("Enter unknown_xml()");
+
+ for (i = 0; i < dominfo->dev_unknown_ct; i++) {
+ struct virt_device *_dev = &dominfo->dev_unknown[i];
+ struct unknown_device *dev = &_dev->dev.unknown;
+ if (others_to_xml(root, dev->others, NULL) != NULL) {
+ CU_DEBUG("others_to_xml failed.");
+ }
+
+ }
+
+ return NULL;
+}
+
char *device_to_xml(struct virt_device *_dev)
{
char *xml = NULL;
@@ -1800,6 +1818,11 @@ char *device_to_xml(struct virt_device *_dev)
dominfo->dev_input_ct = 1;
dominfo->dev_input = dev;
break;
+ case CIM_RES_TYPE_UNKNOWN:
+ func = unknown_xml;
+ dominfo->dev_unknown_ct = 1;
+ dominfo->dev_unknown = dev;
+ break;
default:
cleanup_virt_devices(&dev, 1);
goto out;
--
1.7.1