[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v28 24/33] raw_bsd.c: replace QEMUOptionParameter wi
From: |
Chunyan Liu |
Subject: |
[Qemu-devel] [PATCH v28 24/33] raw_bsd.c: replace QEMUOptionParameter with QemuOpts |
Date: |
Thu, 5 Jun 2014 17:21:03 +0800 |
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Dong Xu Wang <address@hidden>
Signed-off-by: Chunyan Liu <address@hidden>
---
block/raw_bsd.c | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/block/raw_bsd.c b/block/raw_bsd.c
index 9ae5fc2..ee797fd 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
};
--
1.7.12.4
- [Qemu-devel] [PATCH v28 17/33] nfs.c: replace QEMUOptionParameter with QemuOpts, (continued)
- [Qemu-devel] [PATCH v28 17/33] nfs.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/06/05
- [Qemu-devel] [PATCH v28 12/33] change block layer to support both QemuOpts and QEMUOptionParamter, Chunyan Liu, 2014/06/05
- [Qemu-devel] [PATCH v28 14/33] cow.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/06/05
- [Qemu-devel] [PATCH v28 13/33] vvfat.c: handle cross_driver's create_options and create_opts, Chunyan Liu, 2014/06/05
- [Qemu-devel] [PATCH v28 16/33] iscsi.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/06/05
- [Qemu-devel] [PATCH v28 18/33] qcow.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/06/05
- [Qemu-devel] [PATCH v28 22/33] raw-posix.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/06/05
- [Qemu-devel] [PATCH v28 19/33] QemuOpts: export qemu_opt_find, Chunyan Liu, 2014/06/05
- [Qemu-devel] [PATCH v28 20/33] qcow2.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/06/05
- [Qemu-devel] [PATCH v28 21/33] qed.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/06/05
- [Qemu-devel] [PATCH v28 24/33] raw_bsd.c: replace QEMUOptionParameter with QemuOpts,
Chunyan Liu <=
- [Qemu-devel] [PATCH v28 23/33] raw-win32.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/06/05
- [Qemu-devel] [PATCH v28 25/33] rbd.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/06/05
- [Qemu-devel] [PATCH v28 26/33] sheepdog.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/06/05
- [Qemu-devel] [PATCH v28 27/33] ssh.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/06/05
- [Qemu-devel] [PATCH v28 28/33] vdi.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/06/05
- [Qemu-devel] [PATCH v28 29/33] vhdx.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/06/05
- [Qemu-devel] [PATCH v28 31/33] vpc.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/06/05
- [Qemu-devel] [PATCH v28 33/33] QemuOpts: cleanup tmp 'allocated' member from QemuOptsList, Chunyan Liu, 2014/06/05
- [Qemu-devel] [PATCH v28 32/33] cleanup QEMUOptionParameter, Chunyan Liu, 2014/06/05
- [Qemu-devel] [PATCH v28 30/33] vmdk.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/06/05