mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
block: bdrv_get_full_backing_filename_from_...'s ret. val.
Make bdrv_get_full_backing_filename_from_filename() return an allocated string instead of placing the result in a caller-provided buffer. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20190201192935.18394-11-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
009b03aaa2
commit
645ae7d88e
4 changed files with 49 additions and 33 deletions
12
qemu-img.c
12
qemu-img.c
|
@ -3343,18 +3343,14 @@ static int img_rebase(int argc, char **argv)
|
|||
bdrv_refresh_filename(bs);
|
||||
overlay_filename = bs->exact_filename[0] ? bs->exact_filename
|
||||
: bs->filename;
|
||||
out_real_path = g_malloc(PATH_MAX);
|
||||
|
||||
bdrv_get_full_backing_filename_from_filename(overlay_filename,
|
||||
out_baseimg,
|
||||
out_real_path,
|
||||
PATH_MAX,
|
||||
&local_err);
|
||||
out_real_path =
|
||||
bdrv_get_full_backing_filename_from_filename(overlay_filename,
|
||||
out_baseimg,
|
||||
&local_err);
|
||||
if (local_err) {
|
||||
error_reportf_err(local_err,
|
||||
"Could not resolve backing filename: ");
|
||||
ret = -1;
|
||||
g_free(out_real_path);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue