mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
qapi/cryptodev: Rename QCryptodevBackendAlgType to *Algo, and drop prefix
QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. QCryptodevBackendAlgType has a 'prefix' that overrides the generated enumeration constants' prefix to QCRYPTODEV_BACKEND_ALG. We could simply drop 'prefix', but I think the abbreviation "alg" is less than clear. Additionally rename the type to QCryptodevBackendAlgoType. The prefix becomes QCRYPTODEV_BACKEND_ALGO_TYPE. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240904111836.3273842-19-armbru@redhat.com>
This commit is contained in:
parent
d0917d79fd
commit
b1019999e8
6 changed files with 18 additions and 19 deletions
|
@ -185,10 +185,10 @@ static int cryptodev_backend_operation(
|
|||
static int cryptodev_backend_account(CryptoDevBackend *backend,
|
||||
CryptoDevBackendOpInfo *op_info)
|
||||
{
|
||||
enum QCryptodevBackendAlgType algtype = op_info->algtype;
|
||||
enum QCryptodevBackendAlgoType algtype = op_info->algtype;
|
||||
int len;
|
||||
|
||||
if (algtype == QCRYPTODEV_BACKEND_ALG_ASYM) {
|
||||
if (algtype == QCRYPTODEV_BACKEND_ALGO_TYPE_ASYM) {
|
||||
CryptoDevBackendAsymOpInfo *asym_op_info = op_info->u.asym_op_info;
|
||||
len = asym_op_info->src_len;
|
||||
|
||||
|
@ -212,7 +212,7 @@ static int cryptodev_backend_account(CryptoDevBackend *backend,
|
|||
default:
|
||||
return -VIRTIO_CRYPTO_NOTSUPP;
|
||||
}
|
||||
} else if (algtype == QCRYPTODEV_BACKEND_ALG_SYM) {
|
||||
} else if (algtype == QCRYPTODEV_BACKEND_ALGO_TYPE_SYM) {
|
||||
CryptoDevBackendSymOpInfo *sym_op_info = op_info->u.sym_op_info;
|
||||
len = sym_op_info->src_len;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue