[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V3 04/11] qemu-img: switch image retrieving func
From: |
Pavel Hrdina |
Subject: |
Re: [Qemu-devel] [PATCH V3 04/11] qemu-img: switch image retrieving function |
Date: |
Mon, 14 Jan 2013 12:25:08 +0100 |
On Mon, 2013-01-14 at 15:09 +0800, Wenchao Xia wrote:
> Now qemu-img call block layer function to get image info.
>
> Signed-off-by: Wenchao Xia <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> ---
> qemu-img.c | 86 +----------------------------------------------------------
> 1 files changed, 2 insertions(+), 84 deletions(-)
>
> diff --git a/qemu-img.c b/qemu-img.c
> index 9dab48f..e20551a 100644
> --- a/qemu-img.c
> +++ b/qemu-img.c
> @@ -1338,6 +1257,7 @@ static ImageInfoList *collect_image_info_list(const
> char *filename,
> ImageInfoList *head = NULL;
> ImageInfoList **last = &head;
> GHashTable *filenames;
> + Error *err = NULL;
>
> filenames = g_hash_table_new_full(g_str_hash, str_equal_func, NULL,
> NULL);
>
> @@ -1359,9 +1279,7 @@ static ImageInfoList *collect_image_info_list(const
> char *filename,
> goto err;
> }
>
> - info = g_new0(ImageInfo, 1);
> - collect_image_info(bs, info, filename);
> - collect_snapshots(bs, info);
> + info = bdrv_query_image_info(bs, &err);
You are not using the 'err' variable so you should pass 'NULL' instead.
info = bdrv_query_image_info(bs, NULL);
>
> elem = g_new0(ImageInfoList, 1);
> elem->value = info;
- Re: [Qemu-devel] [PATCH V3 01/11] qemu-img: remove unused parameter in collect_image_info(), (continued)
[Qemu-devel] [PATCH V3 02/11] block: add bdrv_get_filename() function, Wenchao Xia, 2013/01/14
[Qemu-devel] [PATCH V3 05/11] block: rename bdrv_query_info to bdrv_query_block_info, Wenchao Xia, 2013/01/14
[Qemu-devel] [PATCH V3 03/11] block: add snapshot and image info query function, Wenchao Xia, 2013/01/14
[Qemu-devel] [PATCH V3 04/11] qemu-img: switch image retrieving function, Wenchao Xia, 2013/01/14
- Re: [Qemu-devel] [PATCH V3 04/11] qemu-img: switch image retrieving function,
Pavel Hrdina <=
[Qemu-devel] [PATCH V3 07/11] block: export function bdrv_find_snapshot(), Wenchao Xia, 2013/01/14
Re: [Qemu-devel] [PATCH V3 07/11] block: export function bdrv_find_snapshot(), Markus Armbruster, 2013/01/15
Re: [Qemu-devel] [PATCH V3 07/11] block: export function bdrv_find_snapshot(), Pavel Hrdina, 2013/01/15