Patchwork [05/11] block: rename bdrv_query_info to bdrv_query_block_info

login
register
mail settings
Submitter Wayne Xia
Date Dec. 29, 2012, 8:45 a.m.
Message ID <1356770725-4804-6-git-send-email-xiawenc@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/208634/
State New
Headers show

Comments

Wayne Xia - Dec. 29, 2012, 8:45 a.m.
Now this function have a mirror name with bdrv_query_image_info
to tip well what it is doing.

Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
---
 block.c               |    4 ++--
 include/block/block.h |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
Eric Blake - Jan. 4, 2013, 10:49 p.m.
On 12/29/2012 01:45 AM, Wenchao Xia wrote:
>   Now this function have a mirror name with bdrv_query_image_info
> to tip well what it is doing.

Awkward to read.  Maybe:

Now that we have bdrv_query_image_info, rename this function to make it
more obvious what it is doing.

> 
> Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
> ---
>  block.c               |    4 ++--
>  include/block/block.h |    2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

Patch

diff --git a/block.c b/block.c
index d39da3d..9dcecec 100644
--- a/block.c
+++ b/block.c
@@ -2964,7 +2964,7 @@  ImageInfo *bdrv_query_image_info(BlockDriverState *bs, Error **errp)
     return info;
 }
 
-BlockInfo *bdrv_query_info(BlockDriverState *bs)
+BlockInfo *bdrv_query_block_info(BlockDriverState *bs)
 {
     BlockInfo *info = g_malloc0(sizeof(*info));
     info->device = g_strdup(bs->device_name);
@@ -3030,7 +3030,7 @@  BlockInfoList *qmp_query_block(Error **errp)
 
     QTAILQ_FOREACH(bs, &bdrv_states, list) {
         BlockInfoList *info = g_malloc0(sizeof(*info));
-        info->value = bdrv_query_info(bs);
+        info->value = bdrv_query_block_info(bs);
 
         *p_next = info;
         p_next = &info->next;
diff --git a/include/block/block.h b/include/block/block.h
index 33d7b7c..3b7c818 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -324,7 +324,7 @@  SnapshotInfoList *bdrv_query_snapshot_infolist(BlockDriverState *bs,
                                                void *opaque,
                                                Error **errp);
 ImageInfo *bdrv_query_image_info(BlockDriverState *bs, Error **errp);
-BlockInfo *bdrv_query_info(BlockDriverState *s);
+BlockInfo *bdrv_query_block_info(BlockDriverState *bs);
 BlockStats *bdrv_query_stats(const BlockDriverState *bs);
 
 int bdrv_can_snapshot(BlockDriverState *bs);