[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH V6 07/10] qapi: convert BlockdevOptions to use enum
From: |
Wenchao Xia |
Subject: |
[Qemu-devel] [PATCH V6 07/10] qapi: convert BlockdevOptions to use enum discriminator |
Date: |
Tue, 11 Feb 2014 05:48:38 +0800 |
After this patch, hidden enum type BlockdevOptionsKind will not
be generated, and other API can use enum BlockdevDriver.
Signed-off-by: Wenchao Xia <address@hidden>
---
qapi-schema.json | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/qapi-schema.json b/qapi-schema.json
index 05ced9d..3e9b554 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -4120,6 +4120,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' ] }
+
+##
# @BlockdevOptionsBase
#
# Options that are available for all block devices, independent of the block
@@ -4143,7 +4155,7 @@
# Since: 1.7
##
{ 'type': 'BlockdevOptionsBase',
- 'data': { 'driver': 'str',
+ 'data': { 'driver': 'BlockdevDriver',
'*id': 'str',
'*node-name': 'str',
'*discard': 'BlockdevDiscardOptions',
--
1.7.1
- [Qemu-devel] [PATCH V6 00/10] qapi script: support enum as discriminator and better enum name, Wenchao Xia, 2014/02/11
- [Qemu-devel] [PATCH V6 02/10] qapi script: add check for duplicated key, Wenchao Xia, 2014/02/11
- [Qemu-devel] [PATCH V6 01/10] qapi script: remember enum values, Wenchao Xia, 2014/02/11
- [Qemu-devel] [PATCH V6 06/10] qapi script: support pre-defined enum type as discriminator in union, Wenchao Xia, 2014/02/11
- [Qemu-devel] [PATCH V6 04/10] qapi script: code move for generate_enum_name(), Wenchao Xia, 2014/02/11
- [Qemu-devel] [PATCH V6 05/10] qapi script: use same function to generate enum string, Wenchao Xia, 2014/02/11
- [Qemu-devel] [PATCH V6 08/10] qapi script: do not allow string discriminator, Wenchao Xia, 2014/02/11
- [Qemu-devel] [PATCH V6 07/10] qapi: convert BlockdevOptions to use enum discriminator,
Wenchao Xia <=
- [Qemu-devel] [PATCH V6 09/10] tests: add cases for inherited struct and union with discriminator, Wenchao Xia, 2014/02/11
- [Qemu-devel] [PATCH V6 10/10] qapi script: do not add "_" for every capitalized char in enum, Wenchao Xia, 2014/02/11
- [Qemu-devel] [PATCH V6 03/10] qapi script: check correctness of discriminator values in union, Wenchao Xia, 2014/02/11