|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] This patch fixes two problems with sendin
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1173456259 0
# Node ID 6ff2a1286484f3e068a6ba106cf68b0f611a63cf
# Parent 87cb4916dd757f48190db8055e6691acd2d5d9fc
This patch fixes two problems with sending and receiving of (arrays of)
structures.
The first one allows to determine the size of a member when parsing a
'set'.
The cast in the second part fixes the address calculation when
serializing an array.
Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>
---
tools/libxen/src/xen_common.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletion(-)
diff -r 87cb4916dd75 -r 6ff2a1286484 tools/libxen/src/xen_common.c
--- a/tools/libxen/src/xen_common.c Fri Mar 09 12:28:37 2007 +0000
+++ b/tools/libxen/src/xen_common.c Fri Mar 09 16:04:19 2007 +0000
@@ -890,6 +890,9 @@ static size_t size_of_member(const abstr
case REF:
return sizeof(arbitrary_record_opt *);
+ case STRUCT:
+ return type->struct_size;
+
default:
assert(false);
}
@@ -1215,7 +1218,8 @@ add_struct_value(const struct abstract_t
for (size_t i = 0; i < set_val->size; i++)
{
- void *member_value = set_val->contents + (i * member_size);
+ void *member_value = (char *)set_val->contents +
+ (i * member_size);
add_struct_value(member_type, member_value,
add_unnamed_value, NULL, data_node);
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] This patch fixes two problems with sending and receiving of (arrays of),
Xen patchbot-unstable <=
|
|
|
|
|