[Libvirt-cim] [PATCH 01/47] Add others member for saving unsupported tag and unknown device

Xu Wang gesaint at linux.vnet.ibm.com
Tue Oct 8 06:13:35 UTC 2013


Signed-off-by: Xu Wang <gesaint at linux.vnet.ibm.com>
---
 libxkutil/device_parsing.h |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/libxkutil/device_parsing.h b/libxkutil/device_parsing.h
index 2b6d3d1..027dd21 100644
--- a/libxkutil/device_parsing.h
+++ b/libxkutil/device_parsing.h
@@ -33,6 +33,26 @@
 
 #include "../src/svpc_types.h"
 
+/* The structure for saving unknown tag in the xml */
+enum others_type {
+        TYPE_PROP,
+        TYPE_NODE
+};
+
+struct others {
+        char *name;
+        char *parent;
+        enum others_type type;
+        char *value;
+        struct others *next;
+};
+
+/* The structure for saving unknown device */
+struct unknown_device {
+        char *name;
+        struct others *others;
+};
+
 struct vsi_device {
         char *vsi_type;
         char *manager_id;
@@ -56,6 +76,7 @@ struct disk_device {
         char *bus_type;
         char *cache;
         char *access_mode; /* access modes for DISK_FS (filesystem) type */
+        struct others *others;
 };
 
 struct net_device {
@@ -70,21 +91,25 @@ struct net_device {
         uint64_t reservation;
         uint64_t limit;
         struct vsi_device vsi;
+        struct others *others;
 };
 
 struct mem_device {
         uint64_t size;
         uint64_t maxsize;
+        struct others *others;
 };
 
 struct vcpu_device {
         uint64_t quantity;
         uint32_t weight;
         uint64_t limit;
+        struct others *others;
 };
 
 struct emu_device {
         char *path;
+        struct others *others;
 };
 
 struct vnc_device {
@@ -92,12 +117,14 @@ struct vnc_device {
         char *host;
         char *keymap;
         char *passwd;
+        struct others *others;
 };
 
 struct sdl_device {
         char *display;
         char *xauth;
         char *fullscreen;
+        struct others *others;
 };
 
 struct graphics_device {
@@ -106,11 +133,13 @@ struct graphics_device {
             struct vnc_device vnc;
             struct sdl_device sdl;
         } dev;
+        struct others *others;
 };
 
 struct input_device {
         char *type;
         char *bus;
+        struct others *others;
 };
 
 struct virt_device {
@@ -123,6 +152,7 @@ struct virt_device {
                 struct emu_device emu;
                 struct graphics_device graphics;
                 struct input_device input;
+                struct unknown_device unknown;
         } dev;
         char *id;
 };
@@ -193,6 +223,11 @@ struct domain {
 
         struct virt_device *dev_vcpu;
         int dev_vcpu_ct;
+
+        struct virt_device *dev_unknown;
+        int dev_unknown_ct;
+
+        struct others *others;
 };
 
 struct virt_device *virt_device_dup(struct virt_device *dev);
-- 
1.7.1




More information about the Libvirt-cim mailing list