summaryrefslogtreecommitdiff
path: root/hw/block
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2018-06-25 09:42:03 -0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-07-02 15:41:13 +0200
commit8f951a13f0dd801dcf95c822091a7db49b323ca2 (patch)
tree164dc59772032bdf47e3f0f81cfd3b5f5dc65e22 /hw/block
parent968dfd0516728c9b284f53d22e96637ca543f699 (diff)
hw/xen: Use the IEC binary prefix definitions
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alan Robinson <Alan.Robinson@ts.fujitsu.com> Message-Id: <20180625124238.25339-12-f4bug@amsat.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/block')
-rw-r--r--hw/block/xen_disk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
index 9fbc0cdb87..36eff94f84 100644
--- a/hw/block/xen_disk.c
+++ b/hw/block/xen_disk.c
@@ -20,6 +20,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include <sys/ioctl.h>
#include <sys/uio.h>
@@ -814,7 +815,7 @@ static int blk_connect(struct XenDevice *xendev)
xen_pv_printf(xendev, 1, "type \"%s\", fileproto \"%s\", filename \"%s\","
" size %" PRId64 " (%" PRId64 " MB)\n",
blkdev->type, blkdev->fileproto, blkdev->filename,
- blkdev->file_size, blkdev->file_size >> 20);
+ blkdev->file_size, blkdev->file_size / MiB);
/* Fill in number of sector size and number of sectors */
xenstore_write_be_int(xendev, "sector-size", blkdev->file_blk);