qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Xen-devel] [PATCH] hw/block/xen: use proper format str


From: Andrew Cooper
Subject: Re: [Qemu-devel] [Xen-devel] [PATCH] hw/block/xen: use proper format string for printing sectors
Date: Wed, 16 Jan 2019 18:03:20 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

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 <address@hidden>
> ---
>  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.

~Andrew



reply via email to

[Prev in Thread] Current Thread [Next in Thread]