Message ID | 1459521906-21810-3-git-send-email-wei.liu2@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Wei Liu writes ("[PATCH 2/2] libxc: use PRIx64 to print out pfn"): > Pfn is always 64 bit long. Use PRIx64 to avoid truncation. .. > { > - PERROR("Invalid pfn 0x%" PRIpfn "", (unsigned long)pfn ); > + PERROR("Invalid pfn 0x%" PRIx64, pfn); Err, sorry. Applied both of these. Ian.
diff --git a/tools/libxc/xc_sr_save.c b/tools/libxc/xc_sr_save.c index b861c7d..291fe9f 100644 --- a/tools/libxc/xc_sr_save.c +++ b/tools/libxc/xc_sr_save.c @@ -555,7 +555,7 @@ static int colo_merge_secondary_dirty_bitmap(struct xc_sr_context *ctx) pfn = pfns[i]; if (pfn > ctx->save.p2m_size) { - PERROR("Invalid pfn 0x%" PRIpfn "", (unsigned long)pfn ); + PERROR("Invalid pfn 0x%" PRIx64, pfn); rc = -1; goto err; }
Pfn is always 64 bit long. Use PRIx64 to avoid truncation. Reported-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Wei Liu <wei.liu2@citrix.com> --- tools/libxc/xc_sr_save.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)