@@ -532,7 +532,6 @@ BlockDriverState *bdrv_next(BdrvNextIterator *it);
void bdrv_next_cleanup(BdrvNextIterator *it);
BlockDriverState *bdrv_next_monitor_owned(BlockDriverState *bs);
-bool bdrv_is_encrypted(BlockDriverState *bs);
void bdrv_iterate_format(void (*it)(void *opaque, const char *name),
void *opaque, bool read_only);
const char *bdrv_get_node_name(const BlockDriverState *bs);
@@ -5065,14 +5065,6 @@ bool bdrv_is_sg(BlockDriverState *bs)
return bs->sg;
}
-bool bdrv_is_encrypted(BlockDriverState *bs)
-{
- if (bs->backing && bs->backing->bs->encrypted) {
- return true;
- }
- return bs->encrypted;
-}
-
const char *bdrv_get_format_name(BlockDriverState *bs)
{
return bs->drv ? bs->drv->format_name : NULL;
@@ -288,7 +288,7 @@ void bdrv_query_image_info(BlockDriverState *bs,
info->virtual_size = size;
info->actual_size = bdrv_get_allocated_file_size(bs);
info->has_actual_size = info->actual_size >= 0;
- if (bdrv_is_encrypted(bs)) {
+ if (bs->encrypted) {
info->encrypted = true;
info->has_encrypted = true;
}