• Fam Zheng's avatar
    block: add block driver read only whitelist · b64ec4e4
    Fam Zheng authored
    
    
    We may want to include a driver in the whitelist for read only tasks
    such as diagnosing or exporting guest data (with libguestfs as a good
    example). This patch introduces a readonly whitelist option, and for
    backward compatibility, the old configure option --block-drv-whitelist
    is now an alias to rw whitelist.
    
    Drivers in readonly list is only permitted to open file readonly, and
    returns -ENOTSUP for RW opening.
    
    E.g. To include vmdk readonly, and others read+write:
        ./configure --target-list=x86_64-softmmu \
                    --block-drv-rw-whitelist=qcow2,raw,file,qed \
                    --block-drv-ro-whitelist=vmdk
    Signed-off-by: default avatarFam Zheng <famz@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    b64ec4e4
block.h 18.6 KB