aboutsummaryrefslogtreecommitdiff
path: root/block/raw_bsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/raw_bsd.c')
-rw-r--r--block/raw_bsd.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/block/raw_bsd.c b/block/raw_bsd.c
index 9ae5fc21d4..ee797fd877 100644
--- a/block/raw_bsd.c
+++ b/block/raw_bsd.c
@@ -29,13 +29,17 @@
#include "block/block_int.h"
#include "qemu/option.h"
-static QEMUOptionParameter raw_create_options[] = {
- {
- .name = BLOCK_OPT_SIZE,
- .type = OPT_SIZE,
- .help = "Virtual disk size"
- },
- { 0 }
+static QemuOptsList raw_create_opts = {
+ .name = "raw-create-opts",
+ .head = QTAILQ_HEAD_INITIALIZER(raw_create_opts.head),
+ .desc = {
+ {
+ .name = BLOCK_OPT_SIZE,
+ .type = QEMU_OPT_SIZE,
+ .help = "Virtual disk size"
+ },
+ { /* end of list */ }
+ }
};
static int raw_reopen_prepare(BDRVReopenState *reopen_state,
@@ -139,13 +143,12 @@ static int raw_has_zero_init(BlockDriverState *bs)
return bdrv_has_zero_init(bs->file);
}
-static int raw_create(const char *filename, QEMUOptionParameter *options,
- Error **errp)
+static int raw_create(const char *filename, QemuOpts *opts, Error **errp)
{
Error *local_err = NULL;
int ret;
- ret = bdrv_create_file(filename, options, NULL, &local_err);
+ ret = bdrv_create_file(filename, NULL, opts, &local_err);
if (local_err) {
error_propagate(errp, local_err);
}
@@ -177,7 +180,7 @@ static BlockDriver bdrv_raw = {
.bdrv_reopen_prepare = &raw_reopen_prepare,
.bdrv_open = &raw_open,
.bdrv_close = &raw_close,
- .bdrv_create = &raw_create,
+ .bdrv_create2 = &raw_create,
.bdrv_co_readv = &raw_co_readv,
.bdrv_co_writev = &raw_co_writev,
.bdrv_co_write_zeroes = &raw_co_write_zeroes,
@@ -194,7 +197,7 @@ static BlockDriver bdrv_raw = {
.bdrv_lock_medium = &raw_lock_medium,
.bdrv_ioctl = &raw_ioctl,
.bdrv_aio_ioctl = &raw_aio_ioctl,
- .create_options = &raw_create_options[0],
+ .create_opts = &raw_create_opts,
.bdrv_has_zero_init = &raw_has_zero_init
};