aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_gnttab.c
diff options
context:
space:
mode:
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>2005-11-22 16:31:16 +0100
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>2005-11-22 16:31:16 +0100
commita22292f2bb59bda113d820fa7da5629408fac98d (patch)
treec5e423a69d01967f816f3d6dc761bff77e53bcce /tools/libxc/xc_gnttab.c
parent10edfe8abf0512c380bc2bb4d79af9460558f815 (diff)
downloadxen-a22292f2bb59bda113d820fa7da5629408fac98d.tar.gz
xen-a22292f2bb59bda113d820fa7da5629408fac98d.tar.bz2
xen-a22292f2bb59bda113d820fa7da5629408fac98d.zip
Make it possible to run valgrind on code linked with the libxc libraries.
Valgrind cannot see when a hypercall has initialised entries in a data structure, so appropriate memsets have been placed before using dom0_op_t, privcmd_hypercall_t, and a couple of miscellaneous blocks passed into this layer. This initialises the block so that valgrind considers it to be valid, but the data therein will be immediately overwritten by the hypercall, all being well. These changes are semantically neutral if -DVALGRIND is not set. Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/libxc/xc_gnttab.c')
-rw-r--r--tools/libxc/xc_gnttab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/libxc/xc_gnttab.c b/tools/libxc/xc_gnttab.c
index fd9df4c1b2..54fb40e6e1 100644
--- a/tools/libxc/xc_gnttab.c
+++ b/tools/libxc/xc_gnttab.c
@@ -17,7 +17,7 @@ do_gnttab_op(int xc_handle,
unsigned long count)
{
int ret = -1;
- privcmd_hypercall_t hypercall;
+ DECLARE_HYPERCALL;
hypercall.op = __HYPERVISOR_grant_table_op;
hypercall.arg[0] = cmd;