Comments

This patch moves collect_image_info() and collect_snapshot()
to general block layer and encapsulate them as bdrv_query_image_info()
and bdrv_query_snapshot_infolist(), as mirror function to brdv_query_info().
The called function in qemu-img.c is switched to bdrv_query_image_info().
To help filter out snapshot info not needed, a call back function is
added in bdrv_query_snapshot_infolist().
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
---
block.c | 118 +++++++++++++++++++++++++++++++++++++++++++++++++
include/block/block.h | 9 ++++
qemu-img.c | 88 +-----------------------------------
3 files changed, 129 insertions(+), 86 deletions(-)