aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--block.c5
-rw-r--r--include/block/block.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/block.c b/block.c
index e8a0342cce..866c8b4b11 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 c3a68d86a1..610be9ff04 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,