From patchwork Fri Dec 20 05:23:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Xia X-Patchwork-Id: 303904 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 2B8AB2C0078 for ; Fri, 20 Dec 2013 16:46:49 +1100 (EST) Received: from localhost ([::1]:47803 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtsZQ-0003Cl-VL for incoming@patchwork.ozlabs.org; Fri, 20 Dec 2013 00:24:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtsX7-00089k-77 for qemu-devel@nongnu.org; Fri, 20 Dec 2013 00:22:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VtsWx-0007Um-95 for qemu-devel@nongnu.org; Fri, 20 Dec 2013 00:21:57 -0500 Received: from e28smtp06.in.ibm.com ([122.248.162.6]:43802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtsWw-0007Tx-JM for qemu-devel@nongnu.org; Fri, 20 Dec 2013 00:21:47 -0500 Received: from /spool/local by e28smtp06.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 20 Dec 2013 10:51:44 +0530 Received: from d28dlp03.in.ibm.com (9.184.220.128) by e28smtp06.in.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 20 Dec 2013 10:51:43 +0530 Received: from d28relay04.in.ibm.com (d28relay04.in.ibm.com [9.184.220.61]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id DA72C1258055 for ; Fri, 20 Dec 2013 10:52:57 +0530 (IST) Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id rBK5LcPO59113492 for ; Fri, 20 Dec 2013 10:51:38 +0530 Received: from d28av02.in.ibm.com (localhost [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id rBK5Lfgd023011 for ; Fri, 20 Dec 2013 10:51:41 +0530 Received: from RH64wenchao ([9.181.129.59]) by d28av02.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id rBK5LU5B021701; Fri, 20 Dec 2013 10:51:40 +0530 From: Wenchao Xia To: qemu-devel@nongnu.org Date: Fri, 20 Dec 2013 13:23:13 +0800 Message-Id: <1387516996-27531-8-git-send-email-xiawenc@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1387516996-27531-1-git-send-email-xiawenc@linux.vnet.ibm.com> References: <1387516996-27531-1-git-send-email-xiawenc@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13122005-9574-0000-0000-00000B205C08 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 122.248.162.6 Cc: kwolf@redhat.com, mdroth@linux.vnet.ibm.com, armbru@redhat.com, lcapitulino@redhat.com, Wenchao Xia Subject: [Qemu-devel] [PATCH V5 07/10] qapi: convert BlockdevOptions to use enum discriminator 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 After this patch, hidden enum type BlockdevOptionsKind will not be generated, and other API can use enum BlockdevDriver. Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake --- qapi-schema.json | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index c3c939c..9b51dcc 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -4046,6 +4046,18 @@ '*no-flush': 'bool' } } ## +# @BlockdevDriver +# +# Drivers that are supported in block device operations. +# +# Since: 2.0 +## +{ 'enum': 'BlockdevDriver', + 'data': [ 'file', 'http', 'https', 'ftp', 'ftps', 'tftp', 'vvfat', 'bochs', + 'cloop', 'cow', 'dmg', 'parallels', 'qcow', 'qcow2', 'qed', 'raw', + 'vdi', 'vhdx', 'vmdk', 'vpc' ] } + +## # @BlockdevOptionsBase # # Options that are available for all block devices, independent of the block @@ -4068,7 +4080,7 @@ # Since: 1.7 ## { 'type': 'BlockdevOptionsBase', - 'data': { 'driver': 'str', + 'data': { 'driver': 'BlockdevDriver', '*id': 'str', '*discard': 'BlockdevDiscardOptions', '*cache': 'BlockdevCacheOptions',