block: Make bdrv_is_whitelisted() public
authorKevin Wolf <kwolf@redhat.com>
Wed, 21 Feb 2018 10:47:43 +0000 (11:47 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 9 Mar 2018 14:17:47 +0000 (15:17 +0100)
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>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
block.c
include/block/block.h

diff --git a/block.c b/block.c
index 4fc65f7621b7bb3f43b62eda1f6df6d15cc6d58c..00f94241fc7d30f3ab64ad948a0c1fc0c7fe9b87 100644 (file)
--- a/block.c
+++ b/block.c
@@ -370,7 +370,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
index 7805187b305466a0481368e2f14b10067394f4b0..cdec3639a353cf296be4d4d1233ed69863b5cc79 100644 (file)
@@ -226,6 +226,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);