[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 3/6] Revert "vdi: Use a literal number of byt
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v3 3/6] Revert "vdi: Use a literal number of bytes for DEFAULT_CLUSTER_SIZE" |
Date: |
Thu, 10 Jan 2019 13:42:09 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 |
On 1/10/19 1:18 PM, Eric Blake wrote:
> This reverts commit 3dd5b8f4718c6ca1eadb16dd67a8cad76455ddb0.
>
> Now that we can express QemuOpts values as an integer, we don't have
> to be careful about how we spell our macro.
Signed-off-by: Eric Blake <address@hidden>
> ---
> block/vdi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/block/vdi.c b/block/vdi.c
> index 65659c9b179..180a45b70f6 100644
> --- a/block/vdi.c
> +++ b/block/vdi.c
> @@ -85,7 +85,7 @@
> #define BLOCK_OPT_STATIC "static"
>
> #define SECTOR_SIZE 512
> -#define DEFAULT_CLUSTER_SIZE S_1MiB
> +#define DEFAULT_CLUSTER_SIZE (1 * MiB)
>
> #if defined(CONFIG_VDI_DEBUG)
> #define VDI_DEBUG 1
> @@ -432,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 %" PRIu32 ")",
> + " is not %" PRIu64 ")",
> header.block_size, DEFAULT_CLUSTER_SIZE);
> ret = -ENOTSUP;
> goto fail;
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v3 0/6] include: Auto-generate the sizes lookup table, Eric Blake, 2019/01/10
- [Qemu-devel] [PATCH v3 3/6] Revert "vdi: Use a literal number of bytes for DEFAULT_CLUSTER_SIZE", Eric Blake, 2019/01/10
- Re: [Qemu-devel] [PATCH v3 3/6] Revert "vdi: Use a literal number of bytes for DEFAULT_CLUSTER_SIZE",
Eric Blake <=
- [Qemu-devel] [PATCH v3 2/6] block: Take advantage of QemuOpt default integers, Eric Blake, 2019/01/10
- [Qemu-devel] [PATCH v3 4/6] qemu: Prefer '(x * MiB)' over 'S_xiB', Eric Blake, 2019/01/10
- [Qemu-devel] [PATCH v3 5/6] Revert "include: Add a comment to explain the origin of sizes' lookup table", Eric Blake, 2019/01/10
- [Qemu-devel] [PATCH v3 6/6] Revert "include: Add a lookup table of sizes", Eric Blake, 2019/01/10
- Re: [Qemu-devel] [Qemu-block] [PATCH v3 0/6] include: Auto-generate the sizes lookup table, Eric Blake, 2019/01/10
- Re: [Qemu-devel] [PATCH v3 0/6] include: Auto-generate the sizes lookup table, Kevin Wolf, 2019/01/11