All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: peter.maydell@linaro.org, Kevin Wolf <kwolf@redhat.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	"open list:Block layer core" <qemu-block@nongnu.org>,
	qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
	Paul Durrant <paul.durrant@citrix.com>,
	Anthony Perard <anthony.perard@citrix.com>,
	"open list:X86" <xen-devel@lists.xenproject.org>
Subject: Re: [Qemu-devel] [Xen-devel] [PATCH] hw/block/xen: use proper format string for printing sectors
Date: Thu, 17 Jan 2019 08:21:10 +0000	[thread overview]
Message-ID: <874la7zocp.fsf@linaro.org> (raw)
In-Reply-To: <c8f655ea-3c3b-290e-1bc2-8f7bb755f4af@citrix.com>


Andrew Cooper <andrew.cooper3@citrix.com> writes:

> On 16/01/2019 12:13, Alex Bennée wrote:
>> 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>
>> ---
>>  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,
>
> PRIu64.
>
> You've changed the signed-ness of what gets printed.

I was deliberate as:
  int64_t blk_getlength(BlockBackend *blk);

although I have to admit a signed block length doesn't make much sense
to me. At least it isn't going to overflow and will show-up if the block
length is ever negative.

>
> ~Andrew


--
Alex Bennée

  parent reply	other threads:[~2019-01-17  8:21 UTC|newest]

Thread overview: 13+ 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
2019-01-16 12:19   ` Paul Durrant
2019-01-16 13:04   ` [Qemu-devel] " Philippe Mathieu-Daudé
2019-01-16 13:04   ` Philippe Mathieu-Daudé
2019-01-16 18:03 ` [Qemu-devel] [Xen-devel] " Andrew Cooper
2019-01-16 18:03   ` Andrew Cooper
2019-01-17  8:21   ` Alex Bennée
2019-01-17  8:21   ` Alex Bennée [this message]
2019-01-17  9:02     ` [Qemu-devel] [Xen-devel] " Paul Durrant
2019-01-17  9:02       ` Paul Durrant
2019-01-21 17:19 ` [Qemu-devel] " Peter Maydell
2019-01-21 17:19   ` 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=874la7zocp.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=paul.durrant@citrix.com \
    --cc=peter.maydell@linaro.org \
    --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 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.