diff options
author | Chunyan Liu <cyliu@suse.com> | 2014-06-05 17:21:03 +0800 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-06-16 17:23:21 +0800 |
commit | cd3a4cf631644636b098243fd118980100efbe01 (patch) | |
tree | ee25e96dcb38f0e7207e1c47a8ad945121cce667 | |
parent | ddef76999396d93b2c7ddfc7e95d5c4bcdeac55a (diff) |
raw_bsd.c: replace QEMUOptionParameter with QemuOpts
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Signed-off-by: Chunyan Liu <cyliu@suse.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r-- | block/raw_bsd.c | 27 |
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 }; |