diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2019-01-16 12:13:50 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-01-21 14:45:49 +0000 |
commit | cce871c504694cf1034adf525556e3ca3c7eebb6 (patch) | |
tree | ac149a354db60bf01bbf8fa2c55139d1be2eb9fe /hw/block | |
parent | bbca106776ab5decb01a0f101c67524546a1fcd2 (diff) | |
download | qemu-cce871c504694cf1034adf525556e3ca3c7eebb6.zip qemu-cce871c504694cf1034adf525556e3ca3c7eebb6.tar.gz qemu-cce871c504694cf1034adf525556e3ca3c7eebb6.tar.bz2 |
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>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20190116121350.23863-1-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/block')
-rw-r--r-- | hw/block/xen-block.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c index be28b63..a636487 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); |