Received: from eggs.gnu.org ([2001:4830:134:3::10]:58624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xyebj-0008Ln-IP for qemu-devel@nongnu.org; Wed, 10 Dec 2014 05:35:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XyebU-0007Hh-Vv for qemu-devel@nongnu.org; Wed, 10 Dec 2014 05:34:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51909) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XyebU-0007HX-Ot for qemu-devel@nongnu.org; Wed, 10 Dec 2014 05:34:44 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBAAYiLG021527 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 10 Dec 2014 05:34:44 -0500 From: Kevin Wolf Date: Wed, 10 Dec 2014 11:33:28 +0100 Message-Id: <1418207679-32260-3-git-send-email-kwolf@redhat.com> In-Reply-To: <1418207679-32260-1-git-send-email-kwolf@redhat.com> References: <1418207679-32260-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PULL 02/73] block: Add bdrv_get_node_name List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com From: Fam Zheng This returns the node name of a BDS. Remove the TODO comment and expect the callers to be explicit. Signed-off-by: Fam Zheng Reviewed-by: Eric Blake Reviewed-by: Max Reitz Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block.c | 5 +++++ include/block/block.h | 1 + 2 files changed, 6 insertions(+) diff --git a/block.c b/block.c index e8a0342..866c8b4 100644 --- a/block.c +++ b/block.c @@ -3817,6 +3817,11 @@ BlockDriverState *bdrv_next(BlockDriverState *bs) return QTAILQ_NEXT(bs, device_list); } +const char *bdrv_get_node_name(const BlockDriverState *bs) +{ + return bs->node_name; +} + /* TODO check what callers really want: bs->node_name or blk_name() */ const char *bdrv_get_device_name(const BlockDriverState *bs) { diff --git a/include/block/block.h b/include/block/block.h index c3a68d8..610be9f 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -382,6 +382,7 @@ int bdrv_set_key(BlockDriverState *bs, const char *key); int bdrv_query_missing_keys(void); void bdrv_iterate_format(void (*it)(void *opaque, const char *name), void *opaque); +const char *bdrv_get_node_name(const BlockDriverState *bs); const char *bdrv_get_device_name(const BlockDriverState *bs); int bdrv_get_flags(BlockDriverState *bs); int bdrv_write_compressed(BlockDriverState *bs, int64_t sector_num, -- 1.8.3.1