@@ -2963,6 +2963,11 @@ BlockStatsList *qmp_query_blockstats(Error **errp)
return head;
}
+const char *bdrv_get_filename(const BlockDriverState *bs)
+{
+ return bs->filename;
+}
+
const char *bdrv_get_encrypted_filename(BlockDriverState *bs)
{
if (bs->backing_hd && bs->backing_hd->encrypted)
@@ -310,6 +310,7 @@ int bdrv_write_compressed(BlockDriverState *bs, int64_t sector_num,
const uint8_t *buf, int nb_sectors);
int bdrv_get_info(BlockDriverState *bs, BlockDriverInfo *bdi);
+const char *bdrv_get_filename(const BlockDriverState *bs);
const char *bdrv_get_encrypted_filename(BlockDriverState *bs);
void bdrv_get_backing_filename(BlockDriverState *bs,
char *filename, int filename_size);