[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [Qemu-devel] [PATCH v4 02/40] vdi: Use definitions fr
From: |
Stefan Weil |
Subject: |
Re: [Qemu-trivial] [Qemu-devel] [PATCH v4 02/40] vdi: Use definitions from "qemu/units.h" |
Date: |
Mon, 11 Jun 2018 21:27:03 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
Am 11.06.2018 um 03:14 schrieb Philippe Mathieu-Daudé:
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> block/vdi.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/block/vdi.c b/block/vdi.c
> index 668af0a828..35b51dc5c5 100644
> --- a/block/vdi.c
> +++ b/block/vdi.c
> @@ -50,6 +50,7 @@
> */
>
> #include "qemu/osdep.h"
> +#include "qemu/units.h"
> #include "qapi/error.h"
> #include "qapi/qmp/qdict.h"
> #include "qapi/qobject-input-visitor.h"
> @@ -83,9 +84,6 @@
> /* Command line option for static images. */
> #define BLOCK_OPT_STATIC "static"
>
> -#define KiB 1024
> -#define MiB (KiB * KiB)
> -
> #define SECTOR_SIZE 512
> #define DEFAULT_CLUSTER_SIZE (1 * MiB)
>
> @@ -250,7 +248,7 @@ static void vdi_header_print(VdiHeader *header)
> logout("heads 0x%04x\n", header->heads);
> logout("sectors 0x%04x\n", header->sectors);
> logout("sector size 0x%04x\n", header->sector_size);
> - logout("image size 0x%" PRIx64 " B (%" PRIu64 " MiB)\n",
> + logout("image size 0x%" PRIx64 " B (%llu MiB)\n",
> header->disk_size, header->disk_size / MiB);
> logout("block size 0x%04x\n", header->block_size);
> logout("block extra 0x%04x\n", header->block_extra);
> @@ -434,7 +432,7 @@ static int vdi_open(BlockDriverState *bs, QDict *options,
> int flags,
> goto fail;
> } else if (header.block_size != DEFAULT_CLUSTER_SIZE) {
> error_setg(errp, "unsupported VDI image (block size %" PRIu32
> - " is not %u)", header.block_size, DEFAULT_CLUSTER_SIZE);
> + " is not %llu)", header.block_size, DEFAULT_CLUSTER_SIZE);
> ret = -ENOTSUP;
> goto fail;
> } else if (header.disk_size >
>
Reviewed-by: Stefan Weil <address@hidden>
- [Qemu-trivial] [PATCH v4 00/40] Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 01/40] include: Add IEC binary prefixes in "qemu/units.h", Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 02/40] vdi: Use definitions from "qemu/units.h", Philippe Mathieu-Daudé, 2018/06/10
- Re: [Qemu-trivial] [Qemu-devel] [PATCH v4 02/40] vdi: Use definitions from "qemu/units.h",
Stefan Weil <=
- [Qemu-trivial] [PATCH v4 03/40] x86/cpu: Use definitions from "qemu/units.h", Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 04/40] checkpatch: Recognize IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 05/40] hw: Use IEC binary prefix definitions from "qemu/units.h", Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 06/40] hw: Directly use "qemu/units.h" instead of "qemu/cutils.h", Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 07/40] hw/ivshmem: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 08/40] hw/ipack: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10