qapi: remove empty flat union branches and types
Flat unions may now have uncovered branches, so it is possible to get rid of empty types defined for that purpose only. Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1529311206-76847-3-git-send-email-anton.nefedov@virtuozzo.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
800877bb16
commit
29cd0403f1
|
@ -4166,7 +4166,6 @@ static ImageInfoSpecific *qcow2_get_specific_info(BlockDriverState *bs)
|
||||||
switch (encrypt_info->format) {
|
switch (encrypt_info->format) {
|
||||||
case Q_CRYPTO_BLOCK_FORMAT_QCOW:
|
case Q_CRYPTO_BLOCK_FORMAT_QCOW:
|
||||||
qencrypt->format = BLOCKDEV_QCOW2_ENCRYPTION_FORMAT_AES;
|
qencrypt->format = BLOCKDEV_QCOW2_ENCRYPTION_FORMAT_AES;
|
||||||
qencrypt->u.aes = encrypt_info->u.qcow;
|
|
||||||
break;
|
break;
|
||||||
case Q_CRYPTO_BLOCK_FORMAT_LUKS:
|
case Q_CRYPTO_BLOCK_FORMAT_LUKS:
|
||||||
qencrypt->format = BLOCKDEV_QCOW2_ENCRYPTION_FORMAT_LUKS;
|
qencrypt->format = BLOCKDEV_QCOW2_ENCRYPTION_FORMAT_LUKS;
|
||||||
|
|
2
cpus.c
2
cpus.c
|
@ -2273,8 +2273,6 @@ CpuInfoFastList *qmp_query_cpus_fast(Error **errp)
|
||||||
info->value->target = target;
|
info->value->target = target;
|
||||||
if (target == SYS_EMU_TARGET_S390X) {
|
if (target == SYS_EMU_TARGET_S390X) {
|
||||||
cpustate_to_cpuinfo_s390(&info->value->u.s390x, cpu);
|
cpustate_to_cpuinfo_s390(&info->value->u.s390x, cpu);
|
||||||
} else {
|
|
||||||
/* do nothing for @CpuInfoOther */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cur_item) {
|
if (!cur_item) {
|
||||||
|
|
|
@ -52,8 +52,7 @@
|
||||||
{ 'union': 'ImageInfoSpecificQCow2Encryption',
|
{ 'union': 'ImageInfoSpecificQCow2Encryption',
|
||||||
'base': 'ImageInfoSpecificQCow2EncryptionBase',
|
'base': 'ImageInfoSpecificQCow2EncryptionBase',
|
||||||
'discriminator': 'format',
|
'discriminator': 'format',
|
||||||
'data': { 'aes': 'QCryptoBlockInfoQCow',
|
'data': { 'luks': 'QCryptoBlockInfoLUKS' } }
|
||||||
'luks': 'QCryptoBlockInfoLUKS' } }
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# @ImageInfoSpecificQCow2:
|
# @ImageInfoSpecificQCow2:
|
||||||
|
@ -2877,16 +2876,6 @@
|
||||||
'data': { 'type': 'SshHostKeyCheckHashType',
|
'data': { 'type': 'SshHostKeyCheckHashType',
|
||||||
'hash': 'str' }}
|
'hash': 'str' }}
|
||||||
|
|
||||||
##
|
|
||||||
# @SshHostKeyDummy:
|
|
||||||
#
|
|
||||||
# For those union branches that don't need additional fields.
|
|
||||||
#
|
|
||||||
# Since: 2.12
|
|
||||||
##
|
|
||||||
{ 'struct': 'SshHostKeyDummy',
|
|
||||||
'data': {} }
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# @SshHostKeyCheck:
|
# @SshHostKeyCheck:
|
||||||
#
|
#
|
||||||
|
@ -2895,9 +2884,7 @@
|
||||||
{ 'union': 'SshHostKeyCheck',
|
{ 'union': 'SshHostKeyCheck',
|
||||||
'base': { 'mode': 'SshHostKeyCheckMode' },
|
'base': { 'mode': 'SshHostKeyCheckMode' },
|
||||||
'discriminator': 'mode',
|
'discriminator': 'mode',
|
||||||
'data': { 'none': 'SshHostKeyDummy',
|
'data': { 'hash': 'SshHostKeyHash' } }
|
||||||
'hash': 'SshHostKeyHash',
|
|
||||||
'known_hosts': 'SshHostKeyDummy' } }
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# @BlockdevOptionsSsh:
|
# @BlockdevOptionsSsh:
|
||||||
|
@ -4075,15 +4062,6 @@
|
||||||
'*subformat': 'BlockdevVpcSubformat',
|
'*subformat': 'BlockdevVpcSubformat',
|
||||||
'*force-size': 'bool' } }
|
'*force-size': 'bool' } }
|
||||||
|
|
||||||
##
|
|
||||||
# @BlockdevCreateNotSupported:
|
|
||||||
#
|
|
||||||
# This is used for all drivers that don't support creating images.
|
|
||||||
#
|
|
||||||
# Since: 2.12
|
|
||||||
##
|
|
||||||
{ 'struct': 'BlockdevCreateNotSupported', 'data': {}}
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# @BlockdevCreateOptions:
|
# @BlockdevCreateOptions:
|
||||||
#
|
#
|
||||||
|
@ -4098,44 +4076,20 @@
|
||||||
'driver': 'BlockdevDriver' },
|
'driver': 'BlockdevDriver' },
|
||||||
'discriminator': 'driver',
|
'discriminator': 'driver',
|
||||||
'data': {
|
'data': {
|
||||||
'blkdebug': 'BlockdevCreateNotSupported',
|
|
||||||
'blkverify': 'BlockdevCreateNotSupported',
|
|
||||||
'bochs': 'BlockdevCreateNotSupported',
|
|
||||||
'cloop': 'BlockdevCreateNotSupported',
|
|
||||||
'copy-on-read': 'BlockdevCreateNotSupported',
|
|
||||||
'dmg': 'BlockdevCreateNotSupported',
|
|
||||||
'file': 'BlockdevCreateOptionsFile',
|
'file': 'BlockdevCreateOptionsFile',
|
||||||
'ftp': 'BlockdevCreateNotSupported',
|
|
||||||
'ftps': 'BlockdevCreateNotSupported',
|
|
||||||
'gluster': 'BlockdevCreateOptionsGluster',
|
'gluster': 'BlockdevCreateOptionsGluster',
|
||||||
'host_cdrom': 'BlockdevCreateNotSupported',
|
|
||||||
'host_device': 'BlockdevCreateNotSupported',
|
|
||||||
'http': 'BlockdevCreateNotSupported',
|
|
||||||
'https': 'BlockdevCreateNotSupported',
|
|
||||||
'iscsi': 'BlockdevCreateNotSupported',
|
|
||||||
'luks': 'BlockdevCreateOptionsLUKS',
|
'luks': 'BlockdevCreateOptionsLUKS',
|
||||||
'nbd': 'BlockdevCreateNotSupported',
|
|
||||||
'nfs': 'BlockdevCreateOptionsNfs',
|
'nfs': 'BlockdevCreateOptionsNfs',
|
||||||
'null-aio': 'BlockdevCreateNotSupported',
|
|
||||||
'null-co': 'BlockdevCreateNotSupported',
|
|
||||||
'nvme': 'BlockdevCreateNotSupported',
|
|
||||||
'parallels': 'BlockdevCreateOptionsParallels',
|
'parallels': 'BlockdevCreateOptionsParallels',
|
||||||
'qcow': 'BlockdevCreateOptionsQcow',
|
'qcow': 'BlockdevCreateOptionsQcow',
|
||||||
'qcow2': 'BlockdevCreateOptionsQcow2',
|
'qcow2': 'BlockdevCreateOptionsQcow2',
|
||||||
'qed': 'BlockdevCreateOptionsQed',
|
'qed': 'BlockdevCreateOptionsQed',
|
||||||
'quorum': 'BlockdevCreateNotSupported',
|
|
||||||
'raw': 'BlockdevCreateNotSupported',
|
|
||||||
'rbd': 'BlockdevCreateOptionsRbd',
|
'rbd': 'BlockdevCreateOptionsRbd',
|
||||||
'replication': 'BlockdevCreateNotSupported',
|
|
||||||
'sheepdog': 'BlockdevCreateOptionsSheepdog',
|
'sheepdog': 'BlockdevCreateOptionsSheepdog',
|
||||||
'ssh': 'BlockdevCreateOptionsSsh',
|
'ssh': 'BlockdevCreateOptionsSsh',
|
||||||
'throttle': 'BlockdevCreateNotSupported',
|
|
||||||
'vdi': 'BlockdevCreateOptionsVdi',
|
'vdi': 'BlockdevCreateOptionsVdi',
|
||||||
'vhdx': 'BlockdevCreateOptionsVhdx',
|
'vhdx': 'BlockdevCreateOptionsVhdx',
|
||||||
'vmdk': 'BlockdevCreateNotSupported',
|
'vpc': 'BlockdevCreateOptionsVpc'
|
||||||
'vpc': 'BlockdevCreateOptionsVpc',
|
|
||||||
'vvfat': 'BlockdevCreateNotSupported',
|
|
||||||
'vxhs': 'BlockdevCreateNotSupported'
|
|
||||||
} }
|
} }
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
|
@ -297,16 +297,6 @@
|
||||||
'uuid': 'str',
|
'uuid': 'str',
|
||||||
'slots': [ 'QCryptoBlockInfoLUKSSlot' ] }}
|
'slots': [ 'QCryptoBlockInfoLUKSSlot' ] }}
|
||||||
|
|
||||||
##
|
|
||||||
# @QCryptoBlockInfoQCow:
|
|
||||||
#
|
|
||||||
# Information about the QCow block encryption options
|
|
||||||
#
|
|
||||||
# Since: 2.7
|
|
||||||
##
|
|
||||||
{ 'struct': 'QCryptoBlockInfoQCow',
|
|
||||||
'data': { }}
|
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# @QCryptoBlockInfo:
|
# @QCryptoBlockInfo:
|
||||||
|
@ -318,5 +308,4 @@
|
||||||
{ 'union': 'QCryptoBlockInfo',
|
{ 'union': 'QCryptoBlockInfo',
|
||||||
'base': 'QCryptoBlockInfoBase',
|
'base': 'QCryptoBlockInfoBase',
|
||||||
'discriminator': 'format',
|
'discriminator': 'format',
|
||||||
'data': { 'qcow': 'QCryptoBlockInfoQCow',
|
'data': { 'luks': 'QCryptoBlockInfoLUKS' } }
|
||||||
'luks': 'QCryptoBlockInfoLUKS' } }
|
|
||||||
|
|
|
@ -396,8 +396,7 @@
|
||||||
'mips': 'CpuInfoMIPS',
|
'mips': 'CpuInfoMIPS',
|
||||||
'tricore': 'CpuInfoTricore',
|
'tricore': 'CpuInfoTricore',
|
||||||
's390': 'CpuInfoS390',
|
's390': 'CpuInfoS390',
|
||||||
'riscv': 'CpuInfoRISCV',
|
'riscv': 'CpuInfoRISCV' } }
|
||||||
'other': 'CpuInfoOther' } }
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# @CpuInfoX86:
|
# @CpuInfoX86:
|
||||||
|
@ -467,16 +466,6 @@
|
||||||
##
|
##
|
||||||
{ 'struct': 'CpuInfoRISCV', 'data': { 'pc': 'int' } }
|
{ 'struct': 'CpuInfoRISCV', 'data': { 'pc': 'int' } }
|
||||||
|
|
||||||
##
|
|
||||||
# @CpuInfoOther:
|
|
||||||
#
|
|
||||||
# No additional information is available about the virtual CPU
|
|
||||||
#
|
|
||||||
# Since: 2.6
|
|
||||||
#
|
|
||||||
##
|
|
||||||
{ 'struct': 'CpuInfoOther', 'data': { } }
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# @CpuS390State:
|
# @CpuS390State:
|
||||||
#
|
#
|
||||||
|
@ -578,38 +567,7 @@
|
||||||
'arch' : 'CpuInfoArch',
|
'arch' : 'CpuInfoArch',
|
||||||
'target' : 'SysEmuTarget' },
|
'target' : 'SysEmuTarget' },
|
||||||
'discriminator' : 'target',
|
'discriminator' : 'target',
|
||||||
'data' : { 'aarch64' : 'CpuInfoOther',
|
'data' : { 's390x' : 'CpuInfoS390' } }
|
||||||
'alpha' : 'CpuInfoOther',
|
|
||||||
'arm' : 'CpuInfoOther',
|
|
||||||
'cris' : 'CpuInfoOther',
|
|
||||||
'hppa' : 'CpuInfoOther',
|
|
||||||
'i386' : 'CpuInfoOther',
|
|
||||||
'lm32' : 'CpuInfoOther',
|
|
||||||
'm68k' : 'CpuInfoOther',
|
|
||||||
'microblaze' : 'CpuInfoOther',
|
|
||||||
'microblazeel' : 'CpuInfoOther',
|
|
||||||
'mips' : 'CpuInfoOther',
|
|
||||||
'mips64' : 'CpuInfoOther',
|
|
||||||
'mips64el' : 'CpuInfoOther',
|
|
||||||
'mipsel' : 'CpuInfoOther',
|
|
||||||
'moxie' : 'CpuInfoOther',
|
|
||||||
'nios2' : 'CpuInfoOther',
|
|
||||||
'or1k' : 'CpuInfoOther',
|
|
||||||
'ppc' : 'CpuInfoOther',
|
|
||||||
'ppc64' : 'CpuInfoOther',
|
|
||||||
'ppcemb' : 'CpuInfoOther',
|
|
||||||
'riscv32' : 'CpuInfoOther',
|
|
||||||
'riscv64' : 'CpuInfoOther',
|
|
||||||
's390x' : 'CpuInfoS390',
|
|
||||||
'sh4' : 'CpuInfoOther',
|
|
||||||
'sh4eb' : 'CpuInfoOther',
|
|
||||||
'sparc' : 'CpuInfoOther',
|
|
||||||
'sparc64' : 'CpuInfoOther',
|
|
||||||
'tricore' : 'CpuInfoOther',
|
|
||||||
'unicore32' : 'CpuInfoOther',
|
|
||||||
'x86_64' : 'CpuInfoOther',
|
|
||||||
'xtensa' : 'CpuInfoOther',
|
|
||||||
'xtensaeb' : 'CpuInfoOther' } }
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# @query-cpus-fast:
|
# @query-cpus-fast:
|
||||||
|
|
|
@ -88,16 +88,6 @@
|
||||||
##
|
##
|
||||||
{ 'command': 'netdev_del', 'data': {'id': 'str'} }
|
{ 'command': 'netdev_del', 'data': {'id': 'str'} }
|
||||||
|
|
||||||
##
|
|
||||||
# @NetdevNoneOptions:
|
|
||||||
#
|
|
||||||
# Use it alone to have zero network devices.
|
|
||||||
#
|
|
||||||
# Since: 1.2
|
|
||||||
##
|
|
||||||
{ 'struct': 'NetdevNoneOptions',
|
|
||||||
'data': { } }
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# @NetLegacyNicOptions:
|
# @NetLegacyNicOptions:
|
||||||
#
|
#
|
||||||
|
@ -477,7 +467,6 @@
|
||||||
'base': { 'id': 'str', 'type': 'NetClientDriver' },
|
'base': { 'id': 'str', 'type': 'NetClientDriver' },
|
||||||
'discriminator': 'type',
|
'discriminator': 'type',
|
||||||
'data': {
|
'data': {
|
||||||
'none': 'NetdevNoneOptions',
|
|
||||||
'nic': 'NetLegacyNicOptions',
|
'nic': 'NetLegacyNicOptions',
|
||||||
'user': 'NetdevUserOptions',
|
'user': 'NetdevUserOptions',
|
||||||
'tap': 'NetdevTapOptions',
|
'tap': 'NetdevTapOptions',
|
||||||
|
@ -530,7 +519,6 @@
|
||||||
'base': { 'type': 'NetLegacyOptionsType' },
|
'base': { 'type': 'NetLegacyOptionsType' },
|
||||||
'discriminator': 'type',
|
'discriminator': 'type',
|
||||||
'data': {
|
'data': {
|
||||||
'none': 'NetdevNoneOptions',
|
|
||||||
'nic': 'NetLegacyNicOptions',
|
'nic': 'NetLegacyNicOptions',
|
||||||
'user': 'NetdevUserOptions',
|
'user': 'NetdevUserOptions',
|
||||||
'tap': 'NetdevTapOptions',
|
'tap': 'NetdevTapOptions',
|
||||||
|
|
19
qapi/ui.json
19
qapi/ui.json
|
@ -995,17 +995,6 @@
|
||||||
'events' : [ 'InputEvent' ] } }
|
'events' : [ 'InputEvent' ] } }
|
||||||
|
|
||||||
|
|
||||||
##
|
|
||||||
# @DisplayNoOpts:
|
|
||||||
#
|
|
||||||
# Empty struct for displays without config options.
|
|
||||||
#
|
|
||||||
# Since: 2.12
|
|
||||||
#
|
|
||||||
##
|
|
||||||
{ 'struct' : 'DisplayNoOpts',
|
|
||||||
'data' : { } }
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# @DisplayGTK:
|
# @DisplayGTK:
|
||||||
#
|
#
|
||||||
|
@ -1068,10 +1057,4 @@
|
||||||
'*window-close' : 'bool',
|
'*window-close' : 'bool',
|
||||||
'*gl' : 'DisplayGLMode' },
|
'*gl' : 'DisplayGLMode' },
|
||||||
'discriminator' : 'type',
|
'discriminator' : 'type',
|
||||||
'data' : { 'default' : 'DisplayNoOpts',
|
'data' : { 'gtk' : 'DisplayGTK' } }
|
||||||
'none' : 'DisplayNoOpts',
|
|
||||||
'gtk' : 'DisplayGTK',
|
|
||||||
'sdl' : 'DisplayNoOpts',
|
|
||||||
'egl-headless' : 'DisplayNoOpts',
|
|
||||||
'curses' : 'DisplayNoOpts',
|
|
||||||
'cocoa' : 'DisplayNoOpts' } }
|
|
||||||
|
|
Loading…
Reference in New Issue