On Thu, Jan 19, 2023 at 2:17 PM Kevin Wolf wrote:
> > assert(!drv->bdrv_needs_filename || bs->filename[0]);
> > -if (drv->bdrv_file_open) {
> > +if (drv->bdrv_open) {
> > ret = drv->bdrv_file_open(bs, options, open_flags, _err);
> > } else if (drv->bdrv_open) {
> >
The set of BlockDrivers that have .bdrv_file_open coincides with those
that have .protocol_name and guess what---checking drv->bdrv_file_open
is done to see if the driver is a protocol. So check drv->protocol_name
instead.
Signed-off-by: Paolo Bonzini
---
block.c | 13 ++---
1 file
Am 12.12.2022 um 14:16 hat Paolo Bonzini geschrieben:
> The set of BlockDrivers that have .bdrv_file_open coincides with those
> that have .protocol_name and guess what---checking drv->bdrv_file_open
> is done to see if the driver is a protocol. So check drv->protocol_name
> instead.
>
>
The set of BlockDrivers that have .bdrv_file_open coincides with those
that have .protocol_name and guess what---checking drv->bdrv_file_open
is done to see if the driver is a protocol. So check drv->protocol_name
instead.
Signed-off-by: Paolo Bonzini
---
block.c | 13 ++---
1 file