aboutsummaryrefslogtreecommitdiff
path: root/block-qcow2.c
diff options
context:
space:
mode:
Diffstat (limited to 'block-qcow2.c')
-rw-r--r--block-qcow2.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/block-qcow2.c b/block-qcow2.c
index 2ad07250ef..a6de9b6919 100644
--- a/block-qcow2.c
+++ b/block-qcow2.c
@@ -23,6 +23,7 @@
*/
#include "qemu-common.h"
#include "block_int.h"
+#include "module.h"
#include <zlib.h>
#include "aes.h"
@@ -2891,7 +2892,7 @@ static int qcow_get_buffer(BlockDriverState *bs, uint8_t *buf,
return ret;
}
-BlockDriver bdrv_qcow2 = {
+static BlockDriver bdrv_qcow2 = {
.format_name = "qcow2",
.instance_size = sizeof(BDRVQcowState),
.bdrv_probe = qcow_probe,
@@ -2921,3 +2922,10 @@ BlockDriver bdrv_qcow2 = {
.bdrv_create2 = qcow_create2,
.bdrv_check = qcow_check,
};
+
+static void bdrv_qcow2_init(void)
+{
+ bdrv_register(&bdrv_qcow2);
+}
+
+block_init(bdrv_qcow2_init);