aboutsummaryrefslogtreecommitdiff
path: root/block-qcow2.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2009-05-09 17:03:42 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2009-05-14 16:13:41 -0500
commit5efa9d5a8b18841c9c62208a494d7f519238979a (patch)
treec3d65b0b6bd54ca614e4e7e4b8eb295117ba9d78 /block-qcow2.c
parent0bfe3ca51ebddbf2cc099fa34f359bd1ac4f65e6 (diff)
Convert block infrastructure to use new module init functionality
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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);