]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
hw/block/xen: use proper format string for printing sectors
authorAlex Bennée <alex.bennee@linaro.org>
Wed, 16 Jan 2019 12:13:50 +0000 (12:13 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 21 Jan 2019 14:45:49 +0000 (14:45 +0000)
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>
hw/block/xen-block.c

index be28b63442b233061252b5f4260bc792e6cde746..a636487b3e853bada51d66c1c65629df20c08e63 100644 (file)
@@ -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);