mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
block: add block driver read only whitelist
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: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
@@ -34,8 +34,15 @@ case $line in
|
||||
done
|
||||
echo ""
|
||||
;;
|
||||
CONFIG_BDRV_WHITELIST=*)
|
||||
echo "#define CONFIG_BDRV_WHITELIST \\"
|
||||
CONFIG_BDRV_RW_WHITELIST=*)
|
||||
echo "#define CONFIG_BDRV_RW_WHITELIST\\"
|
||||
for drv in ${line#*=}; do
|
||||
echo " \"${drv}\",\\"
|
||||
done
|
||||
echo " NULL"
|
||||
;;
|
||||
CONFIG_BDRV_RO_WHITELIST=*)
|
||||
echo "#define CONFIG_BDRV_RO_WHITELIST\\"
|
||||
for drv in ${line#*=}; do
|
||||
echo " \"${drv}\",\\"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user