From: Paul Durrant <Paul.Durrant@citrix.com>
To: "'Alex Bennée'" <alex.bennee@linaro.org>,
"peter.maydell@linaro.org" <peter.maydell@linaro.org>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Anthony Perard" <anthony.perard@citrix.com>,
"Kevin Wolf" <kwolf@redhat.com>, "Max Reitz" <mreitz@redhat.com>,
"open list:X86" <xen-devel@lists.xenproject.org>,
"open list:Block layer core" <qemu-block@nongnu.org>,
"'Philippe Mathieu-Daudé'" <philmd@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] hw/block/xen: use proper format string for printing sectors
Date: Wed, 16 Jan 2019 12:19:40 +0000 [thread overview]
Message-ID: <0dbd67c55295400980f87a191fc5d22c@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <20190116121350.23863-1-alex.bennee@linaro.org>
> -----Original Message-----
> From: Alex Bennée [mailto:alex.bennee@linaro.org]
> Sent: 16 January 2019 12:14
> To: peter.maydell@linaro.org
> Cc: qemu-devel@nongnu.org; Alex Bennée <alex.bennee@linaro.org>; Stefano
> Stabellini <sstabellini@kernel.org>; Anthony Perard
> <anthony.perard@citrix.com>; Paul Durrant <Paul.Durrant@citrix.com>; Kevin
> Wolf <kwolf@redhat.com>; Max Reitz <mreitz@redhat.com>; open list:X86
> <xen-devel@lists.xenproject.org>; open list:Block layer core <qemu-
> block@nongnu.org>
> Subject: [PATCH] hw/block/xen: use proper format string for printing
> sectors
>
> The %lu format string is different depending on the host architecture
> which causes builds like the debian-armhf-cross build to fail. Use the
> correct PRi64 format string.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
This does the same thing as "xen: Fix format string" from Philippe, but this variant is better...
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
> ---
> hw/block/xen-block.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c
> index be28b63442..a636487b3e 100644
> --- a/hw/block/xen-block.c
> +++ b/hw/block/xen-block.c
> @@ -215,7 +215,7 @@ static void xen_block_realize(XenDevice *xendev, Error
> **errp)
>
> xen_device_backend_printf(xendev, "sector-size", "%u",
> conf->logical_block_size);
> - xen_device_backend_printf(xendev, "sectors", "%lu",
> + xen_device_backend_printf(xendev, "sectors", "%"PRIi64,
> blk_getlength(conf->blk) /
> conf->logical_block_size);
>
> --
> 2.17.1
next prev parent reply other threads:[~2019-01-16 12:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-16 12:13 [Qemu-devel] [PATCH] hw/block/xen: use proper format string for printing sectors Alex Bennée
2019-01-16 12:19 ` Paul Durrant [this message]
2019-01-16 13:04 ` Philippe Mathieu-Daudé
2019-01-16 18:03 ` [Qemu-devel] [Xen-devel] " Andrew Cooper
2019-01-17 8:21 ` Alex Bennée
2019-01-17 9:02 ` Paul Durrant
2019-01-21 17:19 ` [Qemu-devel] " Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0dbd67c55295400980f87a191fc5d22c@AMSPEX02CL03.citrite.net \
--to=paul.durrant@citrix.com \
--cc=alex.bennee@linaro.org \
--cc=anthony.perard@citrix.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).