aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_core.c
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-06-06 09:48:17 +0100
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-06-06 09:48:17 +0100
commitab8096f27d7223c01fcf862118cd628b4a255c18 (patch)
tree1dd452499963328b73e2ff81b765e8272bdf9c8b /tools/libxc/xc_core.c
parent542ad2f200de2e7f94a74bbce59579b58d99c8b6 (diff)
downloadxen-ab8096f27d7223c01fcf862118cd628b4a255c18.tar.gz
xen-ab8096f27d7223c01fcf862118cd628b4a255c18.tar.bz2
xen-ab8096f27d7223c01fcf862118cd628b4a255c18.zip
Represent PFNs with their own type, rather than 'unsigned long'.
('long' changes size and alignment between 32- and 64-bit ABIs.) Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Diffstat (limited to 'tools/libxc/xc_core.c')
-rw-r--r--tools/libxc/xc_core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/libxc/xc_core.c b/tools/libxc/xc_core.c
index c5ddeb37ec..ca2ad0bfb5 100644
--- a/tools/libxc/xc_core.c
+++ b/tools/libxc/xc_core.c
@@ -28,7 +28,7 @@ xc_domain_dumpcore_via_callback(int xc_handle,
dumpcore_rtn_t dump_rtn)
{
unsigned long nr_pages;
- unsigned long *page_array = NULL;
+ xen_pfn_t *page_array = NULL;
xc_dominfo_t info;
int i, nr_vcpus = 0;
char *dump_mem, *dump_mem_start = NULL;
@@ -70,7 +70,7 @@ xc_domain_dumpcore_via_callback(int xc_handle,
sizeof(vcpu_guest_context_t)*nr_vcpus;
dummy_len = (sizeof(struct xc_core_header) +
(sizeof(vcpu_guest_context_t) * nr_vcpus) +
- (nr_pages * sizeof(unsigned long)));
+ (nr_pages * sizeof(xen_pfn_t)));
header.xch_pages_offset = round_pgup(dummy_len);
sts = dump_rtn(args, (char *)&header, sizeof(struct xc_core_header));
@@ -81,7 +81,7 @@ xc_domain_dumpcore_via_callback(int xc_handle,
if ( sts != 0 )
goto error_out;
- if ( (page_array = malloc(nr_pages * sizeof(unsigned long))) == NULL )
+ if ( (page_array = malloc(nr_pages * sizeof(xen_pfn_t))) == NULL )
{
printf("Could not allocate memory\n");
goto error_out;
@@ -91,7 +91,7 @@ xc_domain_dumpcore_via_callback(int xc_handle,
printf("Could not get the page frame list\n");
goto error_out;
}
- sts = dump_rtn(args, (char *)page_array, nr_pages * sizeof(unsigned long));
+ sts = dump_rtn(args, (char *)page_array, nr_pages * sizeof(xen_pfn_t));
if ( sts != 0 )
goto error_out;