block: Use common driver selection code for bdrv_open_file()
This moves the bdrv_open_file() call a bit down so that it can use the bdrv_open() code that selects the right block driver. The code between the old and the new call site is either common code (the error message for an unknown driver has been unified now) or doesn't run with cleared BDRV_O_PROTOCOL (added an if block in one place, whereas the right path was already asserted in another place) Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NBenoit Canet <benoit@irqsave.net>
Showing
想要评论请 注册 或 登录