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: Wenchao Xia
Subject: Re: [Qemu-devel] [PATCH V3 04/11] qemu-img: switch image retrieving function
Date: Tue, 15 Jan 2013 10:37:09 +0800
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2

于 2013-1-14 19:25, Pavel Hrdina 写道:
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);

OK.


          elem = g_new0(ImageInfoList, 1);
          elem->value = info;




--
Best Regards

Wenchao Xia




reply via email to

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