mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06: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
|
@ -691,7 +691,7 @@ int main(int argc, char **argv)
|
|||
drv = NULL;
|
||||
}
|
||||
|
||||
bs = bdrv_new("hda", &error_abort);
|
||||
bs = bdrv_new_root("hda", &error_abort);
|
||||
|
||||
srcpath = argv[optind];
|
||||
ret = bdrv_open(&bs, srcpath, NULL, NULL, flags, drv, &local_err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue