From patchwork Thu Feb 27 11:09:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenchao Xia X-Patchwork-Id: 324770 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 B81EA2C0040 for ; Thu, 27 Feb 2014 22:12:34 +1100 (EST) Received: from localhost ([::1]:45390 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIytE-0005TL-FD for incoming@patchwork.ozlabs.org; Thu, 27 Feb 2014 06:12:32 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIyrr-0003mm-5Q for qemu-devel@nongnu.org; Thu, 27 Feb 2014 06:11:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIyri-0006Ed-Gj for qemu-devel@nongnu.org; Thu, 27 Feb 2014 06:11:07 -0500 Received: from mail-pb0-x22f.google.com ([2607:f8b0:400e:c01::22f]:38290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIyri-0006ER-AQ for qemu-devel@nongnu.org; Thu, 27 Feb 2014 06:10:58 -0500 Received: by mail-pb0-f47.google.com with SMTP id up15so2376587pbc.34 for ; Thu, 27 Feb 2014 03:10:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QJ2xIKKzrT585cSWDsLwgr7VM97jM1H6M8G0mvHz/BU=; b=RbAqhiNkFJKz1SPW6wfCQ7dPdpxCmnpFPRK/MEQmDzVVLdalMS4V7NqsumCSQVKCeW nBhb8yEYNYPnrsoWah0XX1j1Xty13EWr81gyg/+p5FOVvRW0h9HDB054q4KMtdv6lUI1 3OpYpVASSZyb9iWIbeRCH/tdyJSM1wYTU7E8c8HZtN2GdPmtkUJQWu8mOBrFypHEfX25 4oiHrCFcV2DyM2KfSvaBA7fcexJpqWUgD/kRo9pGGSoBvDryfkj50J/M3Vjhungj8WHx eSdDIkSMFVaTjoXsIejLyqg5VbIKcgqFodafwzIl9iaQviM2C1EEJPoYe04L6WJl5iuU ctKg== X-Received: by 10.69.0.10 with SMTP id au10mr12946937pbd.48.1393499457514; Thu, 27 Feb 2014 03:10:57 -0800 (PST) Received: from localhost.localdomain.localdomain ([113.247.8.2]) by mx.google.com with ESMTPSA id my6sm7286267pbc.36.2014.02.27.03.10.49 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 27 Feb 2014 03:10:56 -0800 (PST) From: Wenchao Xia To: qemu-devel@nongnu.org Date: Thu, 27 Feb 2014 03:09:34 -0800 Message-Id: <1393499376-4374-9-git-send-email-wenchaoqemu@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1393499376-4374-1-git-send-email-wenchaoqemu@gmail.com> References: <1393499376-4374-1-git-send-email-wenchaoqemu@gmail.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c01::22f Cc: kwolf@redhat.com, Wenchao Xia , mdroth@linux.vnet.ibm.com, armbru@redhat.com, lcapitulino@redhat.com, Wenchao Xia Subject: [Qemu-devel] [PATCH V8 08/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 From: Wenchao Xia After this patch, hidden enum type BlockdevOptionsKind will not be generated, and other API can use enum BlockdevDriver. Signed-off-by: Wenchao Xia 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 fcb2280..7f587b4 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -4200,6 +4200,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', 'blkdebug', + 'blkverify', 'bochs', 'cloop', 'cow', 'dmg', 'parallels', 'qcow', + 'qcow2', 'qed', 'raw', 'vdi', 'vhdx', 'vmdk', 'vpc', 'quorum' ] } + +## # @BlockdevOptionsBase # # Options that are available for all block devices, independent of the block @@ -4223,7 +4235,7 @@ # Since: 1.7 ## { 'type': 'BlockdevOptionsBase', - 'data': { 'driver': 'str', + 'data': { 'driver': 'BlockdevDriver', '*id': 'str', '*node-name': 'str', '*discard': 'BlockdevDiscardOptions',