From patchwork Mon Mar 10 07:32:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunyan Liu X-Patchwork-Id: 328488 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 E8E402C00AC for ; Mon, 10 Mar 2014 18:48:03 +1100 (EST) Received: from localhost ([::1]:47288 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMuwL-0000JT-Q8 for incoming@patchwork.ozlabs.org; Mon, 10 Mar 2014 03:48:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41734) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMuhi-0007S0-Rj for qemu-devel@nongnu.org; Mon, 10 Mar 2014 03:33:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WMuhb-0000gP-CV for qemu-devel@nongnu.org; Mon, 10 Mar 2014 03:32:54 -0400 Received: from victor.provo.novell.com ([137.65.250.26]:54790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMuhb-0000g2-51 for qemu-devel@nongnu.org; Mon, 10 Mar 2014 03:32:47 -0400 Received: from linux-cyliu.lab.bej.apac.novell.com (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by victor.provo.novell.com with ESMTP (NOT encrypted); Mon, 10 Mar 2014 01:32:35 -0600 From: Chunyan Liu To: qemu-devel@nongnu.org Date: Mon, 10 Mar 2014 15:32:00 +0800 Message-Id: <1394436721-21812-25-git-send-email-cyliu@suse.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1394436721-21812-1-git-send-email-cyliu@suse.com> References: <1394436721-21812-1-git-send-email-cyliu@suse.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 137.65.250.26 Cc: kwolf@redhat.com, Dong Xu Wang , Chunyan Liu , stefanha@redhat.com Subject: [Qemu-devel] [PATCH v22 24/25] vvfat.c: replace QEMUOptionParameter with QemuOpts 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 Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/vvfat.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block/vvfat.c b/block/vvfat.c index ee32b3c..03be65d 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -2907,7 +2907,7 @@ static BlockDriver vvfat_write_target = { static int enable_write_target(BDRVVVFATState *s) { BlockDriver *bdrv_qcow; - QEMUOptionParameter *options; + QemuOpts *opts; Error *local_err = NULL; int ret; int size = sector2cluster(s, s->sector_count); @@ -2922,11 +2922,11 @@ static int enable_write_target(BDRVVVFATState *s) } bdrv_qcow = bdrv_find_format("qcow"); - options = parse_option_parameters("", bdrv_qcow->create_options, NULL); - set_option_parameter_int(options, BLOCK_OPT_SIZE, s->sector_count * 512); - set_option_parameter(options, BLOCK_OPT_BACKING_FILE, "fat:"); + opts = qemu_opts_create(bdrv_qcow->create_opts, NULL, 0, &error_abort); + qemu_opt_set_number(opts, BLOCK_OPT_SIZE, s->sector_count * 512); + qemu_opt_set(opts, BLOCK_OPT_BACKING_FILE, "fat:"); - ret = bdrv_create(bdrv_qcow, s->qcow_filename, options, NULL, &local_err); + ret = bdrv_create(bdrv_qcow, s->qcow_filename, NULL, opts, &local_err); if (ret < 0) { qerror_report_err(local_err); error_free(local_err);