qemu-devel
[Top][All Lists]
Advanced

[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;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]