From patchwork Fri Mar 21 00:13:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leandro Dorileo X-Patchwork-Id: 332455 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id BB9D82C00AD for ; Fri, 21 Mar 2014 11:25:25 +1100 (EST) Received: from localhost ([::1]:50204 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQnH1-0006k3-Kg for incoming@patchwork.ozlabs.org; Thu, 20 Mar 2014 20:25:23 -0400 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) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=JsanTcKfFf8z0sejd5btx2RLKcsZ39qY83y8dK7xc7U=; b=LpLr0O1YAtKRo6vjKSqw50L1L5axjH50VpNSb9RLvIVw7v5OWVBrgge3qJKWQV+bVd eCjVuvuQ5PQXPlsCfE4e6WgUjEIYHgQA0WLqwhl7wh85VG+P6dZPOop73JcVe7IAAfEB rilwK0jb+cKlSV9wVElNzIe0afjftPFEuvGp0JFj4Xthd75EigEnzPiZ8llbhysl3WFN vA2ax5okMS8G520bKDlzdT0ukZ9zlgwtlNLzyeBg5dA1ZxIpZcv7CAlhRHlLuHsEkitM AbuHv8lVhksuerj9SXSUY3A/tIt28T9QABfDNr2yBAPXdWtca1RcNgaGM0qRWJg8W8s/ NQnw== X-Gm-Message-State: ALoCoQlPU4p4RlFiOBOy+v6Y6mMSogE364CvP/EESvPHTO+F28Yy9t5r8RDeNure+ttdYQAhgDGk X-Received: by 10.236.120.147 with SMTP id p19mr38332626yhh.6.1395360883756; Thu, 20 Mar 2014 17:14:43 -0700 (PDT) Received: from dorilex-lnv.MultilaserAP ([177.194.92.107]) by mx.google.com with ESMTPSA id k63sm5501231yhg.37.2014.03.20.17.14.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Mar 2014 17:14:43 -0700 (PDT) From: Leandro Dorileo To: qemu-devel@nongnu.org Date: Thu, 20 Mar 2014 21:13:23 -0300 Message-Id: <1395360813-2833-17-git-send-email-l@dorileo.org> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1395360813-2833-1-git-send-email-l@dorileo.org> References: <1395360813-2833-1-git-send-email-l@dorileo.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.213.48 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 Subject: [Qemu-devel] [PATCH 16/26] raw_bsd: migrate raw_bsd driver QemuOptionParameter usage X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 };