δΊ 2013-2-20 7:04, Eric Blake ει:
On 02/18/2013 07:09 AM, Wenchao Xia wrote:
This patch add function bdrv_query_image_info(), which will return
image info in qmp object format. The implementation code are based
on the code moved from qemu-img.c, but use block layer function to get
snapshot info.
A check with bdrv_can_read_snapshot(), was done before collecting
snapshot info.
Signed-off-by: Wenchao Xia <xiaw...@linux.vnet.ibm.com>
Reviewed-by: Eric Blake <ebl...@redhat.com>
Again, your cover letter says you heavily touched this patch; leaving my
Reviewed-by intact is misleading.
Ok, it will be removed if any change was done.
+++ b/block.c
@@ -2649,6 +2649,11 @@ void bdrv_iterate(void (*it)(void *opaque,
BlockDriverState *bs), void *opaque)
}
}
+static const char *bdrv_get_filename(const BlockDriverState *bs)
+{
+ return bs->filename;
+}
This function is now a waste. Since it is static to this file only, and
the only thing it is doing is accessing a field inside bs, all
call-sites have access to the same field directly, without having to go
through this wrapper.
OK.
--
Best Regards
Wenchao Xia