Signed-off-by: Xu Wang <gesaint(a)linux.vnet.ibm.com>
---
libxkutil/device_parsing.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/libxkutil/device_parsing.c b/libxkutil/device_parsing.c
index 5e9ecb4..8f1a46c 100644
--- a/libxkutil/device_parsing.c
+++ b/libxkutil/device_parsing.c
@@ -49,6 +49,7 @@
#define GRAPHICS_XPATH (xmlChar *)"/domain/devices/graphics | "\
"/domain/devices/console"
#define INPUT_XPATH (xmlChar *)"/domain/devices/input"
+#define UNKNOWN_XPATH (xmlChar *)"/domain/devices"
#define DEFAULT_BRIDGE "xenbr0"
#define DEFAULT_NETWORK "default"
@@ -2206,6 +2207,11 @@ static int parse_devices(const char *xml, struct virt_device
**_list, int type)
func = &parse_input_device;
break;
+ case CIM_RES_TYPE_UNKNOWN:
+ xpathstr = UNKNOWN_XPATH;
+ func = &parse_unknown_device;
+ break;
+
default:
CU_DEBUG("Unrecognized device type. Returning.");
goto err1;
@@ -2674,6 +2680,9 @@ int get_dominfo_from_xml(const char *xml, struct domain **dominfo)
(*dominfo)->dev_vcpu_ct = parse_devices(xml,
&(*dominfo)->dev_vcpu,
CIM_RES_TYPE_PROC);
+ (*dominfo)->dev_unknown_ct = parse_devices(xml,
+ &(*dominfo)->dev_unknown,
+ CIM_RES_TYPE_UNKNOWN);
return ret;
--
1.7.1