On 1/16/19 1:19 PM, Paul Durrant wrote:
>> -----Original Message-----
>> From: Alex Bennée [mailto:[email protected]]
>> Sent: 16 January 2019 12:14
>> To: [email protected]
>> Cc: [email protected]; Alex Bennée <[email protected]>; Stefano
>> Stabellini <[email protected]>; Anthony Perard
>> <[email protected]>; Paul Durrant <[email protected]>; Kevin
>> Wolf <[email protected]>; Max Reitz <[email protected]>; open list:X86
>> <[email protected]>; open list:Block layer core <qemu-
>> [email protected]>
>> 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 <[email protected]>
> 
> This does the same thing as "xen: Fix format string" from Philippe, but this 
> variant is better...

OK.

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>

> 
> Reviewed-by: Paul Durrant <[email protected]>
> 
>> ---
>>  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
> 

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to