提交 e8eb8637 编写于 作者: K Kevin Wolf

block: Make bdrv_is_whitelisted() public

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: NKevin Wolf <kwolf@redhat.com>
Reviewed-by: NMax Reitz <mreitz@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
上级 b76b4f60
...@@ -370,7 +370,7 @@ BlockDriver *bdrv_find_format(const char *format_name) ...@@ -370,7 +370,7 @@ BlockDriver *bdrv_find_format(const char *format_name)
return bdrv_do_find_format(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[] = { static const char *whitelist_rw[] = {
CONFIG_BDRV_RW_WHITELIST CONFIG_BDRV_RW_WHITELIST
......
...@@ -226,6 +226,7 @@ char *bdrv_perm_names(uint64_t perm); ...@@ -226,6 +226,7 @@ char *bdrv_perm_names(uint64_t perm);
void bdrv_init(void); void bdrv_init(void);
void bdrv_init_with_whitelist(void); void bdrv_init_with_whitelist(void);
bool bdrv_uses_whitelist(void); bool bdrv_uses_whitelist(void);
int bdrv_is_whitelisted(BlockDriver *drv, bool read_only);
BlockDriver *bdrv_find_protocol(const char *filename, BlockDriver *bdrv_find_protocol(const char *filename,
bool allow_protocol_prefix, bool allow_protocol_prefix,
Error **errp); Error **errp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册