diff options
author | Fam Zheng <famz@redhat.com> | 2013-05-29 19:35:40 +0800 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-06-04 12:11:58 +0200 |
commit | b64ec4e4ade581d662753cdeb0d7e0e27aafbf81 (patch) | |
tree | 73a06f4c2528be5cf76830bb9679b4a37e87aa7e /scripts/create_config | |
parent | 8ddd08c5d1415a71f21157686d43f48ff14992b6 (diff) | |
download | qemu-b64ec4e4ade581d662753cdeb0d7e0e27aafbf81.zip qemu-b64ec4e4ade581d662753cdeb0d7e0e27aafbf81.tar.gz qemu-b64ec4e4ade581d662753cdeb0d7e0e27aafbf81.tar.bz2 |
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>
Diffstat (limited to 'scripts/create_config')
-rwxr-xr-x | scripts/create_config | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/create_config b/scripts/create_config index c471e8c..258513a 100755 --- a/scripts/create_config +++ b/scripts/create_config @@ -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 |