
On 10/27/2013 10:45 PM, Xu Wang wrote:
Signed-off-by: Xu Wang <gesaint@linux.vnet.ibm.com> --- libxkutil/device_parsing.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 43 insertions(+), 0 deletions(-)
I am going to try to take these one at a time. Run them through cimtest singly to see if I can flesh out errors. I didn't get very far - 2/48 causes some failures in cimtest ...
diff --git a/libxkutil/device_parsing.h b/libxkutil/device_parsing.h index 2803d6a..147551a 100644 --- a/libxkutil/device_parsing.h +++ b/libxkutil/device_parsing.h @@ -33,6 +33,33 @@
#include "../src/svpc_types.h"
+/* The structure for saving unknown tag in the xml */ +enum others_type { + TYPE_PROP, + TYPE_NODE +}; + +struct others {
There's an extra space after the { which git am complains about
+ /* To identify the different tags with same name */ + int id; + char *name; + int parent_id; + char *parent_name; + enum others_type type; + char *value; + struct others *next; + enum status { + ACTIVE, + INACTIVE + };
Older compiler complains: ../libxkutil/device_parsing.h:54: warning: declaration does not declare anything New compiler where I don't ignore warnings stops: In file included from device_parsing.c:33:0: device_parsing.h:54:10: error: declaration does not declare anything [-Werror] }; ^ cc1: all warnings being treated as errors I'll have to see more to determine whether I like this pointer to pointer within structures... There's usually some assumption somewhere which causes a failure... John
+}; + +/* 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 +83,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,6 +98,7 @@ struct net_device { uint64_t reservation; uint64_t limit; struct vsi_device vsi; + struct others *others; };
struct mem_device { @@ -78,16 +107,19 @@ struct mem_device { enum { MEM_DUMP_CORE_NOT_SET, MEM_DUMP_CORE_ON, MEM_DUMP_CORE_OFF } dumpCore; + 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 { @@ -95,12 +127,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 { @@ -109,6 +143,7 @@ struct graphics_device { struct vnc_device vnc; struct sdl_device sdl; } dev; + struct others *others; };
struct path_device { @@ -146,11 +181,13 @@ struct console_device { struct udp_device udp; } source_dev; char *target_type; + struct others *others; };
struct input_device { char *type; char *bus; + struct others *others; };
struct virt_device { @@ -164,6 +201,7 @@ struct virt_device { struct graphics_device graphics; struct console_device console; struct input_device input; + struct unknown_device unknown; } dev; char *id; }; @@ -239,6 +277,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);