Skip to content
  • Kevin Wolf's avatar
    block: Improve driver whitelist checks · 8f94a6e4
    Kevin Wolf authored
    
    
    The main intent of this patch is to consolidate the whitelist checks to
    a single point in the code instead of spreading it everywhere. This adds
    a nicer error message for read-only whitelisting, too, in places where
    it was still missing.
    
    The patch also contains a bonus bug fix: By finding the format first in
    bdrv_open() and then independently checking against the whitelist only
    later, we avoid the case that use of a non-whitelisted format results in
    probing rather than an error message. Previously, this could happen when
    using the driver=... option.
    
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    Reviewed-by: default avatarFam Zheng <famz@redhat.com>
    8f94a6e4