Re: [PATCH 2/3] block: do not check bdrv_file_open

2023-04-21 Thread Paolo Bonzini
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) { > >

[PATCH 2/3] block: do not check bdrv_file_open

2023-03-09 Thread Paolo Bonzini
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

Re: [PATCH 2/3] block: do not check bdrv_file_open

2023-01-19 Thread Kevin Wolf
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. > >

[PATCH 2/3] block: do not check bdrv_file_open

2022-12-12 Thread Paolo Bonzini
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