mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-02-26 22:25:12 -07:00
block: Split bdrv_new_root() off bdrv_new()
Creating an anonymous BDS can't fail. Make that obvious. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Benoît Canet <benoit.canet@nodalink.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
ec0de76874
commit
e4e9986b1c
9 changed files with 30 additions and 19 deletions
|
|
@ -523,7 +523,7 @@ static DriveInfo *blockdev_init(const char *file, QDict *bs_opts,
|
|||
}
|
||||
|
||||
/* init */
|
||||
bs = bdrv_new(qemu_opts_id(opts), errp);
|
||||
bs = bdrv_new_root(qemu_opts_id(opts), errp);
|
||||
if (!bs) {
|
||||
goto early_err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue