[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] patch libxen: xen_common.c generates wrong XML tag for input parameter of type xen_string_set


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Dube, Lutz" <Lutz.Dube@xxxxxxxxxxxxxxxxxxx>
  • Date: Tue, 3 Mar 2009 09:34:56 +0100
  • Accept-language: de-DE, en-US
  • Acceptlanguage: de-DE, en-US
  • Delivery-date: Tue, 03 Mar 2009 00:35:36 -0800
  • Domainkey-signature: s=s768; d=fujitsu-siemens.com; c=nofws; q=dns; h=X-SBRSScore:X-IronPort-AV:Received:Received:From:To:Date: Subject:Thread-Topic:Thread-Index:Message-ID: Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:acceptlanguage:Content-Type: MIME-Version; b=gl5FCwV+x+LIbj5Ylzj0Z1jXF88aclbiRAfUbheBO+WpcNuMJrr0JOGs a3CoWKWHbdEcziimeJiUnKBSTF6CciNR0WdtD/lNPrbucu+EEaCeor6TE 1ZXisL6Wlk9R8EV;
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: Acmb2u6h7l0kNovcQ+m79qesZzt2vw==
  • Thread-topic: patch libxen: xen_common.c generates wrong XML tag for input parameter of type xen_string_set

# HG changeset patch
# User vm2000@xxxxxxxxxxxxxxxxxxxx
# Node ID dc9bc6403dc76287e2d9643430f74b5b8c46a4bb
# Parent  f8187a343ad2bdbfe3166d7ee7e3d55a9f157fdc
The patch fixes a problem in libxen which prevents the uses of the
c function 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@xxxxxxxxxxxxxxxxxxx>
 
diff -r f8187a343ad2 -r dc9bc6403dc7 tools/libxen/src/xen_common.c
--- a/tools/libxen/src/xen_common.c     Fri Feb 20 17:02:36 2009 +0000
+++ b/tools/libxen/src/xen_common.c     Mon Mar 02 17:20:32 2009 +0100
@@ -90,6 +90,8 @@ static xmlNode *
static xmlNode *
add_param_struct(xmlNode *);
static xmlNode *
+add_param_array(xmlNode *);
+static xmlNode *
add_struct_array(xmlNode *, const char *);
static xmlNode *
add_nested_struct(xmlNode *, const char *);
@@ -1292,7 +1294,7 @@ make_body_add_type(enum abstract_typenam
         const struct abstract_type *member_type = v->type->child;
         arbitrary_set *set_val = v->u.struct_val;
         abstract_value v;
-        xmlNode *data_node = add_param_struct(params_node);
+        xmlNode *data_node = add_param_array(params_node);
 
         for (size_t i = 0; i < set_val->size; i++)
         {
@@ -1611,6 +1613,16 @@ add_param_struct(xmlNode *params_node)
}
 
 
+static xmlNode *
+add_param_array(xmlNode *params_node)
+{
+    xmlNode *param_node = add_container(params_node, "param");
+    xmlNode *value_node = add_container(param_node,  "value");
+
+    return xmlNewChild(value_node, NULL, BAD_CAST "array", NULL);
+}
+
+
static void
add_struct_member(xmlNode *struct_node, const char *name, const char *type,
                   const char *value)
 
 
---
Lutz Dube
Softwareentwickler
FSC IP SW OS 7
 
Fujitsu Siemens Computers GmbH
Otto-Hahn-Ring 6
81730 München
 
Telefon:                ++49 89 636 49272
Telefax:                ++49 89 636 49974
Email:          mailto:Lutz.Dube@xxxxxxxxxxxxxxxxxxx
 
Internet:               http://www.fujitsu-siemens.de
 
 
 

Attachment: libxen_patch.txt
Description: libxen_patch.txt

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.