diff options
author | Max Reitz <mreitz@redhat.com> | 2019-02-01 20:29:13 +0100 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2019-02-25 15:11:26 +0100 |
commit | 009b03aaa233ccf5bd3014404995540158d7dc93 (patch) | |
tree | 5e2705c8175471c53990bea7d4ff154652fdc133 /include/block | |
parent | 0f62cd8204163ba082056094a0bcb693faf67bf6 (diff) | |
download | qemu-009b03aaa233ccf5bd3014404995540158d7dc93.zip qemu-009b03aaa233ccf5bd3014404995540158d7dc93.tar.gz qemu-009b03aaa233ccf5bd3014404995540158d7dc93.tar.bz2 |
block: Make path_combine() return the path
Besides being safe for arbitrary path lengths, after some follow-up
patches all callers will want a freshly allocated buffer anyway.
In the meantime, path_combine_deprecated() is added which has the same
interface as path_combine() had before this patch. All callers to that
function will be converted in follow-up patches.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 20190201192935.18394-10-mreitz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r-- | include/block/block.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/include/block/block.h b/include/block/block.h index aaae900..e233372 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -496,9 +496,7 @@ void bdrv_get_full_backing_filename_from_filename(const char *backed, int path_has_protocol(const char *path); int path_is_absolute(const char *path); -void path_combine(char *dest, int dest_size, - const char *base_path, - const char *filename); +char *path_combine(const char *base_path, const char *filename); int bdrv_readv_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos); int bdrv_writev_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos); |