aboutsummaryrefslogtreecommitdiff
path: root/block-raw-win32.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-raw-win32.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-raw-win32.c')
-rw-r--r--block-raw-win32.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/block-raw-win32.c b/block-raw-win32.c
index a998166a79..15f3ec4849 100644
--- a/block-raw-win32.c
+++ b/block-raw-win32.c
@@ -24,6 +24,7 @@
#include "qemu-common.h"
#include "qemu-timer.h"
#include "block_int.h"
+#include "module.h"
#include <windows.h>
#include <winioctl.h>
@@ -227,7 +228,7 @@ static int raw_create(const char *filename, int64_t total_size,
return 0;
}
-BlockDriver bdrv_raw = {
+static BlockDriver bdrv_raw = {
.format_name = "raw",
.instance_size = sizeof(BDRVRawState),
.bdrv_open = raw_open,
@@ -371,7 +372,7 @@ static int raw_set_locked(BlockDriverState *bs, int locked)
}
#endif
-BlockDriver bdrv_host_device = {
+static BlockDriver bdrv_host_device = {
.format_name = "host_device",
.instance_size = sizeof(BDRVRawState),
.bdrv_open = hdev_open,
@@ -382,3 +383,11 @@ BlockDriver bdrv_host_device = {
.bdrv_write = raw_write,
.bdrv_getlength = raw_getlength,
};
+
+static void bdrv_raw_init(void)
+{
+ bdrv_register(&bdrv_raw);
+ bdrv_register(&bdrv_host_device);
+}
+
+block_init(bdrv_raw_init);