[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 00/57] Migration pull
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [Qemu-devel] [PULL 00/57] Migration pull |
Date: |
Tue, 10 Nov 2015 12:22:40 +0000 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
* Peter Maydell (address@hidden) wrote:
> On 10 November 2015 at 10:53, Peter Maydell <address@hidden> wrote:
> > On 9 November 2015 at 22:36, Eric Blake <address@hidden> wrote:
> >> The only POSIX-ly correct portable way to print ssize_t is via casts
> >> (yes, quite ugly), as in:
> >>
> >> printf("%zu", (size_t)(ssize_t_value));
> >
> > I'm running a test build using this approach.
>
> The following fixup patch was sufficient to get the pull through
> my tests.
>
> Signed-off-by: Peter Maydell <address@hidden>
OK, it's just error messages anyway (we'll probably get afew
odd big values in there in the -ve cases).
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Is this OK or are you expecting Juan to send you a new pull?
Dave
> diff --git a/migration/migration.c b/migration/migration.c
> index 58eb099..c5c977e 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -1284,9 +1284,9 @@ static void *source_return_path_thread(void *opaque)
> header_len != rp_cmd_args[header_type].len) ||
> header_len > max_len) {
> error_report("RP: Received '%s' message (0x%04x) with"
> - "incorrect length %d expecting %zd",
> + "incorrect length %d expecting %zu",
> rp_cmd_args[header_type].name, header_type, header_len,
> - rp_cmd_args[header_type].len);
> + (size_t)rp_cmd_args[header_type].len);
> mark_source_rp_bad(ms);
> goto out;
> }
> diff --git a/migration/qemu-file-unix.c b/migration/qemu-file-unix.c
> index 7ccdf69..c503b02 100644
> --- a/migration/qemu-file-unix.c
> +++ b/migration/qemu-file-unix.c
> @@ -55,8 +55,8 @@ static ssize_t socket_writev_buffer(void *opaque,
> struct iovec *iov, int iovcnt,
> err = socket_error();
>
> if (err != EAGAIN && err != EWOULDBLOCK) {
> - error_report("socket_writev_buffer: Got err=%d for
> (%zd/%zd)",
> - err, size, len);
> + error_report("socket_writev_buffer: Got err=%d for
> (%zu/%zu)",
> + err, (size_t)size, (size_t)len);
> /*
> * If I've already sent some but only just got the error, I
> * could return the amount validly sent so far and wait for
> the
> diff --git a/migration/savevm.c b/migration/savevm.c
> index fad34b8..be52314 100644
> --- a/migration/savevm.c
> +++ b/migration/savevm.c
> @@ -1602,8 +1602,9 @@ static int loadvm_process_command(QEMUFile *f)
> }
>
> if (mig_cmd_args[cmd].len != -1 && mig_cmd_args[cmd].len != len) {
> - error_report("%s received with bad length - expecting %zd, got %d",
> - mig_cmd_args[cmd].name, mig_cmd_args[cmd].len, len);
> + error_report("%s received with bad length - expecting %zu, got %d",
> + mig_cmd_args[cmd].name,
> + (size_t)mig_cmd_args[cmd].len, len);
> return -ERANGE;
> }
>
> thanks
> -- PMM
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK
- [Qemu-devel] [PULL 56/57] Inhibit ballooning during postcopy, (continued)
Re: [Qemu-devel] [PULL 00/57] Migration pull, Juan Quintela, 2015/11/09
Re: [Qemu-devel] [PULL 00/57] Migration pull, Markus Armbruster, 2015/11/09