[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH V2 02/11] block: add bdrv_get_filename() function
From: |
Wenchao Xia |
Subject: |
[Qemu-devel] [PATCH V2 02/11] block: add bdrv_get_filename() function |
Date: |
Wed, 9 Jan 2013 13:12:21 +0800 |
This function will simply return the uri or filename used
to open the image.
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Wenchao Xia <address@hidden>
---
block.c | 5 +++++
include/block/block.h | 1 +
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/block.c b/block.c
index 4e28c55..5f95da5 100644
--- a/block.c
+++ b/block.c
@@ -2967,6 +2967,11 @@ BlockStatsList *qmp_query_blockstats(Error **errp)
return head;
}
+const char *bdrv_get_filename(BlockDriverState *bs)
+{
+ return bs->filename;
+}
+
const char *bdrv_get_encrypted_filename(BlockDriverState *bs)
{
if (bs->backing_hd && bs->backing_hd->encrypted)
diff --git a/include/block/block.h b/include/block/block.h
index 0719339..a0fc2a6 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -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(BlockDriverState *bs);
const char *bdrv_get_encrypted_filename(BlockDriverState *bs);
void bdrv_get_backing_filename(BlockDriverState *bs,
char *filename, int filename_size);
--
1.7.1
- [Qemu-devel] [PATCH V2 00/11] add qmp/hmp interfaces for snapshot info, Wenchao Xia, 2013/01/09
- [Qemu-devel] [PATCH V2 00/11] add qmp/hmp interfaces for snapshot info, Wenchao Xia, 2013/01/09
- [Qemu-devel] [PATCH V2 01/11] qemu-img: remove unused parameter in collect_image_info(), Wenchao Xia, 2013/01/09
- [Qemu-devel] [PATCH V2 03/11] block: add snapshot and image info query function, Wenchao Xia, 2013/01/09
- [Qemu-devel] [PATCH V2 04/11] qemu-img: switch image retrieving function, Wenchao Xia, 2013/01/09
- [Qemu-devel] [PATCH V2 07/11] block: export function bdrv_find_snapshot(), Wenchao Xia, 2013/01/09
- [Qemu-devel] [PATCH V2 02/11] block: add bdrv_get_filename() function,
Wenchao Xia <=
- [Qemu-devel] [PATCH V2 08/11] qmp: add interface query-snapshots, Wenchao Xia, 2013/01/09
- [Qemu-devel] [PATCH V2 05/11] block: rename bdrv_query_info to bdrv_query_block_info, Wenchao Xia, 2013/01/09
- [Qemu-devel] [PATCH V2 09/11] hmp: export function hmp_handle_error(), Wenchao Xia, 2013/01/09
- [Qemu-devel] [PATCH V2 06/11] qmp: add interface query-images., Wenchao Xia, 2013/01/09
- [Qemu-devel] [PATCH V2 10/11] hmp: retrieve info from qmp for snapshot info, Wenchao Xia, 2013/01/09
- [Qemu-devel] [PATCH V2 11/11] hmp: show snapshot on single block device, Wenchao Xia, 2013/01/09