diff options
Diffstat (limited to 'tools/libxc/xc_core.c')
-rw-r--r-- | tools/libxc/xc_core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/libxc/xc_core.c b/tools/libxc/xc_core.c index 035bf301e5..37be5d9cd0 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; - xen_pfn_t *page_array = NULL; + uint64_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(xen_pfn_t))); + (nr_pages * sizeof(*page_array))); 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(xen_pfn_t))) == NULL ) + if ( (page_array = malloc(nr_pages * sizeof(*page_array))) == NULL ) { IPRINTF("Could not allocate memory\n"); goto error_out; @@ -91,7 +91,7 @@ xc_domain_dumpcore_via_callback(int xc_handle, IPRINTF("Could not get the page frame list\n"); goto error_out; } - sts = dump_rtn(args, (char *)page_array, nr_pages * sizeof(xen_pfn_t)); + sts = dump_rtn(args, (char *)page_array, nr_pages * sizeof(*page_array)); if ( sts != 0 ) goto error_out; |