mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
qapi crypto: Elide redundant has_FOO in generated C
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/crypto.json. Said commit explains the transformation in more detail. The invariant violations mentioned there do not occur here. Cc: Daniel P. Berrangé" <berrange@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20221104160712.3005652-13-armbru@redhat.com>
This commit is contained in:
parent
8de69efab1
commit
16110c8b36
3 changed files with 8 additions and 15 deletions
|
@ -41,7 +41,6 @@
|
|||
static QCryptoBlockCreateOptions qcow_create_opts = {
|
||||
.format = Q_CRYPTO_BLOCK_FORMAT_QCOW,
|
||||
.u.qcow = {
|
||||
.has_key_secret = true,
|
||||
.key_secret = (char *)"sec0",
|
||||
},
|
||||
};
|
||||
|
@ -49,7 +48,6 @@ static QCryptoBlockCreateOptions qcow_create_opts = {
|
|||
static QCryptoBlockOpenOptions qcow_open_opts = {
|
||||
.format = Q_CRYPTO_BLOCK_FORMAT_QCOW,
|
||||
.u.qcow = {
|
||||
.has_key_secret = true,
|
||||
.key_secret = (char *)"sec0",
|
||||
},
|
||||
};
|
||||
|
@ -59,7 +57,6 @@ static QCryptoBlockOpenOptions qcow_open_opts = {
|
|||
static QCryptoBlockOpenOptions luks_open_opts = {
|
||||
.format = Q_CRYPTO_BLOCK_FORMAT_LUKS,
|
||||
.u.luks = {
|
||||
.has_key_secret = true,
|
||||
.key_secret = (char *)"sec0",
|
||||
},
|
||||
};
|
||||
|
@ -69,7 +66,6 @@ static QCryptoBlockOpenOptions luks_open_opts = {
|
|||
static QCryptoBlockCreateOptions luks_create_opts_default = {
|
||||
.format = Q_CRYPTO_BLOCK_FORMAT_LUKS,
|
||||
.u.luks = {
|
||||
.has_key_secret = true,
|
||||
.key_secret = (char *)"sec0",
|
||||
},
|
||||
};
|
||||
|
@ -79,7 +75,6 @@ static QCryptoBlockCreateOptions luks_create_opts_default = {
|
|||
static QCryptoBlockCreateOptions luks_create_opts_aes256_cbc_plain64 = {
|
||||
.format = Q_CRYPTO_BLOCK_FORMAT_LUKS,
|
||||
.u.luks = {
|
||||
.has_key_secret = true,
|
||||
.key_secret = (char *)"sec0",
|
||||
.has_cipher_alg = true,
|
||||
.cipher_alg = QCRYPTO_CIPHER_ALG_AES_256,
|
||||
|
@ -94,7 +89,6 @@ static QCryptoBlockCreateOptions luks_create_opts_aes256_cbc_plain64 = {
|
|||
static QCryptoBlockCreateOptions luks_create_opts_aes256_cbc_essiv = {
|
||||
.format = Q_CRYPTO_BLOCK_FORMAT_LUKS,
|
||||
.u.luks = {
|
||||
.has_key_secret = true,
|
||||
.key_secret = (char *)"sec0",
|
||||
.has_cipher_alg = true,
|
||||
.cipher_alg = QCRYPTO_CIPHER_ALG_AES_256,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue