mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
vmdk: Fix error for JSON descriptor file names
If vmdk blindly tries to use path_combine() using bs->file->filename as the base file name, this will result in a bad error message for JSON file names when calling bdrv_open(). It is better to only try bs->file->exact_filename; if that is empty, bs->file->filename will be useless for path_combine() and an error should be emitted (containing bs->file->filename because desc_file_path (which is bs->file->exact_filename) is empty). Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-id: 1417615043-26174-2-git-send-email-mreitz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
ebd9fbd7e1
commit
5c98415b2a
3 changed files with 11 additions and 2 deletions
2
block.c
2
block.c
|
@ -229,7 +229,7 @@ size_t bdrv_opt_mem_align(BlockDriverState *bs)
|
|||
}
|
||||
|
||||
/* check if the path starts with "<protocol>:" */
|
||||
static int path_has_protocol(const char *path)
|
||||
int path_has_protocol(const char *path)
|
||||
{
|
||||
const char *p;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue