ia64/xen-unstable

changeset 19264:ae58b4403cae

libxen: fix a problem preventing use of xen_event_register().

The conversion of input parameter xen_string_set to XML format creates
a XML "struct" tag instead of "array". The patch sets the XML tag for
SET now to "array".

Signed-off-by: Lutz Dube <Lutz.Dube@fujitsu-siemens.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Mar 03 11:41:15 2009 +0000 (2009-03-03)
parents bb281d11fa99
children 9c5b4efc934d
files tools/libxen/src/xen_common.c
line diff
     1.1 --- a/tools/libxen/src/xen_common.c	Tue Mar 03 11:37:31 2009 +0000
     1.2 +++ b/tools/libxen/src/xen_common.c	Tue Mar 03 11:41:15 2009 +0000
     1.3 @@ -90,6 +90,8 @@ add_param(xmlNode *, const char *, const
     1.4  static xmlNode *
     1.5  add_param_struct(xmlNode *);
     1.6  static xmlNode *
     1.7 +add_param_array(xmlNode *);
     1.8 +static xmlNode *
     1.9  add_struct_array(xmlNode *, const char *);
    1.10  static xmlNode *
    1.11  add_nested_struct(xmlNode *, const char *);
    1.12 @@ -1292,7 +1294,7 @@ make_body_add_type(enum abstract_typenam
    1.13          const struct abstract_type *member_type = v->type->child;
    1.14          arbitrary_set *set_val = v->u.struct_val;
    1.15          abstract_value v;
    1.16 -        xmlNode *data_node = add_param_struct(params_node);
    1.17 +        xmlNode *data_node = add_param_array(params_node);
    1.18  
    1.19          for (size_t i = 0; i < set_val->size; i++)
    1.20          {
    1.21 @@ -1611,6 +1613,16 @@ add_param_struct(xmlNode *params_node)
    1.22  }
    1.23  
    1.24  
    1.25 +static xmlNode *
    1.26 +add_param_array(xmlNode *params_node)
    1.27 +{
    1.28 +    xmlNode *param_node = add_container(params_node, "param");
    1.29 +    xmlNode *value_node = add_container(param_node,  "value");
    1.30 +
    1.31 +    return xmlNewChild(value_node, NULL, BAD_CAST "array", NULL);
    1.32 +}
    1.33 +
    1.34 +
    1.35  static void
    1.36  add_struct_member(xmlNode *struct_node, const char *name, const char *type,
    1.37                    const char *value)