aboutsummaryrefslogtreecommitdiff
path: root/include/block
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2014-11-26 17:20:25 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2015-01-13 11:47:56 +0000
commit0a82855a1a819f3de49781d42728f485fbd64284 (patch)
treefc6f93a121984366f6e8e1bdb44e4e6813c17eca /include/block
parenta97ceca578e69f9b050a2400e1979a068b0654eb (diff)
block: Get full backing filename from string
Introduce bdrv_get_full_backing_filename_from_filename(), a function which takes the name of the backed file and a potentially relative backing filename to produce the full (absolute) backing filename. Use this function from bdrv_get_full_backing_filename(). Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r--include/block/block.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/block/block.h b/include/block/block.h
index 6e7275d95b..eac9bb0957 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -397,6 +397,9 @@ void bdrv_get_backing_filename(BlockDriverState *bs,
char *filename, int filename_size);
void bdrv_get_full_backing_filename(BlockDriverState *bs,
char *dest, size_t sz);
+void bdrv_get_full_backing_filename_from_filename(const char *backed,
+ const char *backing,
+ char *dest, size_t sz);
int bdrv_is_snapshot(BlockDriverState *bs);
int path_has_protocol(const char *path);