* [PATCH] migration: Fix format in error message
@ 2024-03-11 12:34 Anthony PERARD
2024-03-11 13:15 ` Peter Xu
0 siblings, 1 reply; 2+ messages in thread
From: Anthony PERARD @ 2024-03-11 12:34 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Peter Xu, Fabiano Rosas
From: Anthony PERARD <anthony.perard@citrix.com>
In file_write_ramblock_iov(), "offset" is "uintptr_t" and not
"ram_addr_t". While usually they are both equivalent, this is not the
case with CONFIG_XEN_BACKEND.
Use the right format. This will fix build on 32-bit.
Fixes: f427d90b9898 ("migration/multifd: Support outgoing mapped-ram stream format")
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
migration/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/migration/file.c b/migration/file.c
index 164b079966..5054a60851 100644
--- a/migration/file.c
+++ b/migration/file.c
@@ -191,7 +191,7 @@ int file_write_ramblock_iov(QIOChannel *ioc, const struct iovec *iov,
*/
offset = (uintptr_t) iov[slice_idx].iov_base - (uintptr_t) block->host;
if (offset >= block->used_length) {
- error_setg(errp, "offset " RAM_ADDR_FMT
+ error_setg(errp, "offset %" PRIxPTR
"outside of ramblock %s range", offset, block->idstr);
ret = -1;
break;
--
Anthony PERARD
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] migration: Fix format in error message
2024-03-11 12:34 [PATCH] migration: Fix format in error message Anthony PERARD
@ 2024-03-11 13:15 ` Peter Xu
0 siblings, 0 replies; 2+ messages in thread
From: Peter Xu @ 2024-03-11 13:15 UTC (permalink / raw)
To: Anthony PERARD; +Cc: qemu-devel, qemu-trivial, Fabiano Rosas
On Mon, Mar 11, 2024 at 12:34:39PM +0000, Anthony PERARD wrote:
> From: Anthony PERARD <anthony.perard@citrix.com>
>
> In file_write_ramblock_iov(), "offset" is "uintptr_t" and not
> "ram_addr_t". While usually they are both equivalent, this is not the
> case with CONFIG_XEN_BACKEND.
>
> Use the right format. This will fix build on 32-bit.
>
> Fixes: f427d90b9898 ("migration/multifd: Support outgoing mapped-ram stream format")
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Rather than waiting for a trivial pull, I'll queue this for 9.0. Thanks.
--
Peter Xu
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-11 13:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-11 12:34 [PATCH] migration: Fix format in error message Anthony PERARD
2024-03-11 13:15 ` Peter Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).