[Qemu-devel] [PATCH v2 13/36] block: Make bdrv_is_whitelisted() public

Kevin Wolf posted 36 patches 7 years, 8 months ago
There is a newer version of this series
[Qemu-devel] [PATCH v2 13/36] block: Make bdrv_is_whitelisted() public
Posted by Kevin Wolf 7 years, 8 months ago
We'll use a separate source file for image creation, and we need to
check there whether the requested driver is whitelisted.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 include/block/block.h | 1 +
 block.c               | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/block/block.h b/include/block/block.h
index 54fe8b7a0e..cfce88cbda 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -225,6 +225,7 @@ char *bdrv_perm_names(uint64_t perm);
 void bdrv_init(void);
 void bdrv_init_with_whitelist(void);
 bool bdrv_uses_whitelist(void);
+int bdrv_is_whitelisted(BlockDriver *drv, bool read_only);
 BlockDriver *bdrv_find_protocol(const char *filename,
                                 bool allow_protocol_prefix,
                                 Error **errp);
diff --git a/block.c b/block.c
index c0e343d278..4a7e448226 100644
--- a/block.c
+++ b/block.c
@@ -372,7 +372,7 @@ BlockDriver *bdrv_find_format(const char *format_name)
     return bdrv_do_find_format(format_name);
 }
 
-static int bdrv_is_whitelisted(BlockDriver *drv, bool read_only)
+int bdrv_is_whitelisted(BlockDriver *drv, bool read_only)
 {
     static const char *whitelist_rw[] = {
         CONFIG_BDRV_RW_WHITELIST
-- 
2.13.6


Re: [Qemu-devel] [PATCH v2 13/36] block: Make bdrv_is_whitelisted() public
Posted by Max Reitz 7 years, 8 months ago
On 2018-02-21 14:53, Kevin Wolf wrote:
> We'll use a separate source file for image creation, and we need to
> check there whether the requested driver is whitelisted.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  include/block/block.h | 1 +
>  block.c               | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Max Reitz <mreitz@redhat.com>

Re: [Qemu-devel] [PATCH v2 13/36] block: Make bdrv_is_whitelisted() public
Posted by Eric Blake 7 years, 8 months ago
On 02/21/2018 07:53 AM, Kevin Wolf wrote:
> We'll use a separate source file for image creation, and we need to
> check there whether the requested driver is whitelisted.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>   include/block/block.h | 1 +
>   block.c               | 2 +-
>   2 files changed, 2 insertions(+), 1 deletion(-)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org