From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQn6o-0001o8-Da for qemu-devel@nongnu.org; Thu, 20 Mar 2014 20:14:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQn6i-0007hb-4k for qemu-devel@nongnu.org; Thu, 20 Mar 2014 20:14:50 -0400 Received: from mail-yh0-f48.google.com ([209.85.213.48]:53525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQn6i-0007hW-1T for qemu-devel@nongnu.org; Thu, 20 Mar 2014 20:14:44 -0400 Received: by mail-yh0-f48.google.com with SMTP id z6so1694590yhz.35 for ; Thu, 20 Mar 2014 17:14:43 -0700 (PDT) From: Leandro Dorileo Date: Thu, 20 Mar 2014 21:13:23 -0300 Message-Id: <1395360813-2833-17-git-send-email-l@dorileo.org> In-Reply-To: <1395360813-2833-1-git-send-email-l@dorileo.org> References: <1395360813-2833-1-git-send-email-l@dorileo.org> Subject: [Qemu-devel] [PATCH 16/26] raw_bsd: migrate raw_bsd driver QemuOptionParameter usage List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Fam Zheng , Stefan Hajnoczi , Liu Yuan , Jeff Cody , Markus Armbruster , Peter Lieven , "Richard W.M. Jones" , Luiz Capitulino , Leandro Dorileo , Ronnie Sahlberg , Josh Durgin , Anthony Liguori , Paolo Bonzini , Stefan Weil , Max Reitz , MORITA Kazutaka , Benoit Canet Do the directly migration from QemuOptionParameter to QemuOpts on raw_bsd block driver. Signed-off-by: Leandro Dorileo --- block/raw_bsd.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/block/raw_bsd.c b/block/raw_bsd.c index 01ea692..5090b4e 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" +static QemuOptsList raw_create_options = { + .name = "raw_create_options", + .head = QTAILQ_HEAD_INITIALIZER(raw_create_options.head), + .desc = { + { + .name = BLOCK_OPT_SIZE, + .type = QEMU_OPT_SIZE, + .help = "Virtual disk size" + }, + { 0 } }, - { 0 } }; static int raw_reopen_prepare(BDRVReopenState *reopen_state, @@ -139,8 +143,7 @@ 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 *options, Error **errp) { Error *local_err = NULL; int ret; @@ -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_options = &raw_create_options, .bdrv_has_zero_init = &raw_has_zero_init }; -- 1.9.0