block: do not check bdrv_file_open
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Nov 2022 15:21:18 +0000 (16:21 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 28 Jun 2024 12:44:51 +0000 (14:44 +0200)
commit41770f6e6ff41ca98e130c79b566f05ec68912fe
tree9201a2f828b7388605e4c2e5a5d5f29d2d2e452e
parentae8b45d29317be0bcc60d40e5d627f978b27ccd0
block: do not check bdrv_file_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 <pbonzini@redhat.com>
block.c