* [PATCH] tools: migration: Use PRIpfn when printing frame numbers.
@ 2015-11-11 13:33 Ian Campbell
2015-11-11 13:36 ` Andrew Cooper
2015-11-11 13:44 ` Wei Liu
0 siblings, 2 replies; 4+ messages in thread
From: Ian Campbell @ 2015-11-11 13:33 UTC (permalink / raw)
To: ian.jackson, wei.liu2, xen-devel; +Cc: Andrew Cooper, Ian Campbell
This avoids various printf formatting warnings when building on arm32.
While touching the affected lines make them consistently use %#.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
---
tools/libxc/xc_sr_restore.c | 15 ++++++++-------
tools/libxc/xc_sr_save.c | 2 +-
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/tools/libxc/xc_sr_restore.c b/tools/libxc/xc_sr_restore.c
index f48e7fc..05159bb 100644
--- a/tools/libxc/xc_sr_restore.c
+++ b/tools/libxc/xc_sr_restore.c
@@ -341,7 +341,7 @@ static int process_page_data(struct xc_sr_context *ctx, unsigned count,
if ( map_errs[j] )
{
rc = -1;
- ERROR("Mapping pfn %lx (mfn %lx, type %#x)failed with %d",
+ ERROR("Mapping pfn %#"PRIpfn" (mfn %#"PRIpfn", type %#"PRIx32") failed with %d",
pfns[i], mfns[j], types[i], map_errs[j]);
goto err;
}
@@ -350,7 +350,7 @@ static int process_page_data(struct xc_sr_context *ctx, unsigned count,
rc = ctx->restore.ops.localise_page(ctx, types[i], page_data);
if ( rc )
{
- ERROR("Failed to localise pfn %lx (type %#x)",
+ ERROR("Failed to localise pfn %#"PRIpfn" (type %#"PRIx32")",
pfns[i], types[i] >> XEN_DOMCTL_PFINFO_LTAB_SHIFT);
goto err;
}
@@ -359,7 +359,7 @@ static int process_page_data(struct xc_sr_context *ctx, unsigned count,
{
/* Verify mode - compare incoming data to what we already have. */
if ( memcmp(guest_page, page_data, PAGE_SIZE) )
- ERROR("verify pfn %lx failed (type %#x)",
+ ERROR("verify pfn %#"PRIpfn" failed (type %#"PRIx32")",
pfns[i], types[i] >> XEN_DOMCTL_PFINFO_LTAB_SHIFT);
}
else
@@ -432,7 +432,7 @@ static int handle_page_data(struct xc_sr_context *ctx, struct xc_sr_record *rec)
pfn = pages->pfn[i] & PAGE_DATA_PFN_MASK;
if ( !ctx->restore.ops.pfn_is_valid(ctx, pfn) )
{
- ERROR("pfn %#lx (index %u) outside domain maximum", pfn, i);
+ ERROR("pfn %#"PRIpfn" (index %u) outside domain maximum", pfn, i);
goto err;
}
@@ -440,7 +440,8 @@ static int handle_page_data(struct xc_sr_context *ctx, struct xc_sr_record *rec)
if ( ((type >> XEN_DOMCTL_PFINFO_LTAB_SHIFT) >= 5) &&
((type >> XEN_DOMCTL_PFINFO_LTAB_SHIFT) <= 8) )
{
- ERROR("Invalid type %#x for pfn %#lx (index %u)", type, pfn, i);
+ ERROR("Invalid type %#"PRIx32" for pfn %#"PRIpfn" (index %u)",
+ type, pfn, i);
goto err;
}
else if ( type < XEN_DOMCTL_PFINFO_BROKEN )
@@ -775,12 +776,12 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom,
return -1;
}
- IPRINTF("XenStore: mfn %#lx, dom %d, evt %u",
+ IPRINTF("XenStore: mfn %#"PRIpfn", dom %d, evt %u",
ctx.restore.xenstore_gfn,
ctx.restore.xenstore_domid,
ctx.restore.xenstore_evtchn);
- IPRINTF("Console: mfn %#lx, dom %d, evt %u",
+ IPRINTF("Console: mfn %#"PRIpfn", dom %d, evt %u",
ctx.restore.console_gfn,
ctx.restore.console_domid,
ctx.restore.console_evtchn);
diff --git a/tools/libxc/xc_sr_save.c b/tools/libxc/xc_sr_save.c
index d1bdf72..0c12e56 100644
--- a/tools/libxc/xc_sr_save.c
+++ b/tools/libxc/xc_sr_save.c
@@ -174,7 +174,7 @@ static int write_batch(struct xc_sr_context *ctx)
if ( errors[p] )
{
- ERROR("Mapping of pfn %#lx (mfn %#lx) failed %d",
+ ERROR("Mapping of pfn %#"PRIpfn" (mfn %#"PRIpfn") failed %d",
ctx->save.batch_pfns[i], mfns[p], errors[p]);
goto err;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] tools: migration: Use PRIpfn when printing frame numbers.
2015-11-11 13:33 [PATCH] tools: migration: Use PRIpfn when printing frame numbers Ian Campbell
@ 2015-11-11 13:36 ` Andrew Cooper
2015-11-11 13:44 ` Wei Liu
1 sibling, 0 replies; 4+ messages in thread
From: Andrew Cooper @ 2015-11-11 13:36 UTC (permalink / raw)
To: Ian Campbell, ian.jackson, wei.liu2, xen-devel
On 11/11/15 13:33, Ian Campbell wrote:
> This avoids various printf formatting warnings when building on arm32.
>
> While touching the affected lines make them consistently use %#.
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tools: migration: Use PRIpfn when printing frame numbers.
2015-11-11 13:33 [PATCH] tools: migration: Use PRIpfn when printing frame numbers Ian Campbell
2015-11-11 13:36 ` Andrew Cooper
@ 2015-11-11 13:44 ` Wei Liu
2015-11-16 12:06 ` Ian Campbell
1 sibling, 1 reply; 4+ messages in thread
From: Wei Liu @ 2015-11-11 13:44 UTC (permalink / raw)
To: Ian Campbell; +Cc: wei.liu2, Andrew Cooper, ian.jackson, xen-devel
On Wed, Nov 11, 2015 at 01:33:46PM +0000, Ian Campbell wrote:
> This avoids various printf formatting warnings when building on arm32.
>
> While touching the affected lines make them consistently use %#.
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tools: migration: Use PRIpfn when printing frame numbers.
2015-11-11 13:44 ` Wei Liu
@ 2015-11-16 12:06 ` Ian Campbell
0 siblings, 0 replies; 4+ messages in thread
From: Ian Campbell @ 2015-11-16 12:06 UTC (permalink / raw)
To: Wei Liu; +Cc: Andrew Cooper, ian.jackson, xen-devel
On Wed, 2015-11-11 at 13:44 +0000, Wei Liu wrote:
> On Wed, Nov 11, 2015 at 01:33:46PM +0000, Ian Campbell wrote:
> > This avoids various printf formatting warnings when building on arm32.
> >
> > While touching the affected lines make them consistently use %#.
> >
> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> > Cc: Andrew Cooper <andrew.cooper3@citrix.com>
>
> Acked-by: Wei Liu <wei.liu2@citrix.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-11-16 12:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-11 13:33 [PATCH] tools: migration: Use PRIpfn when printing frame numbers Ian Campbell
2015-11-11 13:36 ` Andrew Cooper
2015-11-11 13:44 ` Wei Liu
2015-11-16 12:06 ` Ian Campbell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.