diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2009-05-09 17:03:42 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-05-14 16:13:41 -0500 |
commit | 5efa9d5a8b18841c9c62208a494d7f519238979a (patch) | |
tree | c3d65b0b6bd54ca614e4e7e4b8eb295117ba9d78 /block-nbd.c | |
parent | 0bfe3ca51ebddbf2cc099fa34f359bd1ac4f65e6 (diff) |
Convert block infrastructure to use new module init functionality
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'block-nbd.c')
-rw-r--r-- | block-nbd.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/block-nbd.c b/block-nbd.c index 632cb2dd2f..47d4778999 100644 --- a/block-nbd.c +++ b/block-nbd.c @@ -28,6 +28,7 @@ #include "qemu-common.h" #include "nbd.h" +#include "module.h" #include <sys/types.h> #include <unistd.h> @@ -176,7 +177,7 @@ static int64_t nbd_getlength(BlockDriverState *bs) return s->size; } -BlockDriver bdrv_nbd = { +static BlockDriver bdrv_nbd = { .format_name = "nbd", .instance_size = sizeof(BDRVNBDState), .bdrv_open = nbd_open, @@ -186,3 +187,10 @@ BlockDriver bdrv_nbd = { .bdrv_getlength = nbd_getlength, .protocol_name = "nbd", }; + +static void bdrv_nbd_init(void) +{ + bdrv_register(&bdrv_nbd); +} + +block_init(bdrv_nbd_init); |