aboutsummaryrefslogtreecommitdiff
path: root/block-bochs.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-bochs.c
parent0bfe3ca51ebddbf2cc099fa34f359bd1ac4f65e6 (diff)
downloadqemu-5efa9d5a8b18841c9c62208a494d7f519238979a.zip
qemu-5efa9d5a8b18841c9c62208a494d7f519238979a.tar.gz
qemu-5efa9d5a8b18841c9c62208a494d7f519238979a.tar.bz2
Convert block infrastructure to use new module init functionality
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'block-bochs.c')
-rw-r--r--block-bochs.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/block-bochs.c b/block-bochs.c
index 7a75412..bac81c4 100644
--- a/block-bochs.c
+++ b/block-bochs.c
@@ -24,6 +24,7 @@
*/
#include "qemu-common.h"
#include "block_int.h"
+#include "module.h"
/**************************************************************/
@@ -241,7 +242,7 @@ static void bochs_close(BlockDriverState *bs)
close(s->fd);
}
-BlockDriver bdrv_bochs = {
+static BlockDriver bdrv_bochs = {
.format_name = "bochs",
.instance_size = sizeof(BDRVBochsState),
.bdrv_probe = bochs_probe,
@@ -249,3 +250,10 @@ BlockDriver bdrv_bochs = {
.bdrv_read = bochs_read,
.bdrv_close = bochs_close,
};
+
+static void bdrv_bochs_init(void)
+{
+ bdrv_register(&bdrv_bochs);
+}
+
+block_init(bdrv_bochs_init);