mirror of https://gitee.com/openkylin/qemu.git
block/crypto: rename two functions
rename the write_func to create_write_func, and init_func to create_init_func. This is preparation for other write_func that will be used to update the encryption keys. No functional changes Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20200608094030.670121-7-mlevitsk@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
0b6786a9c1
commit
e0d0ddc591
|
@ -79,12 +79,12 @@ struct BlockCryptoCreateData {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static ssize_t block_crypto_write_func(QCryptoBlock *block,
|
static ssize_t block_crypto_create_write_func(QCryptoBlock *block,
|
||||||
size_t offset,
|
size_t offset,
|
||||||
const uint8_t *buf,
|
const uint8_t *buf,
|
||||||
size_t buflen,
|
size_t buflen,
|
||||||
void *opaque,
|
void *opaque,
|
||||||
Error **errp)
|
Error **errp)
|
||||||
{
|
{
|
||||||
struct BlockCryptoCreateData *data = opaque;
|
struct BlockCryptoCreateData *data = opaque;
|
||||||
ssize_t ret;
|
ssize_t ret;
|
||||||
|
@ -97,11 +97,10 @@ static ssize_t block_crypto_write_func(QCryptoBlock *block,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static ssize_t block_crypto_create_init_func(QCryptoBlock *block,
|
||||||
static ssize_t block_crypto_init_func(QCryptoBlock *block,
|
size_t headerlen,
|
||||||
size_t headerlen,
|
void *opaque,
|
||||||
void *opaque,
|
Error **errp)
|
||||||
Error **errp)
|
|
||||||
{
|
{
|
||||||
struct BlockCryptoCreateData *data = opaque;
|
struct BlockCryptoCreateData *data = opaque;
|
||||||
Error *local_error = NULL;
|
Error *local_error = NULL;
|
||||||
|
@ -313,8 +312,8 @@ static int block_crypto_co_create_generic(BlockDriverState *bs,
|
||||||
};
|
};
|
||||||
|
|
||||||
crypto = qcrypto_block_create(opts, NULL,
|
crypto = qcrypto_block_create(opts, NULL,
|
||||||
block_crypto_init_func,
|
block_crypto_create_init_func,
|
||||||
block_crypto_write_func,
|
block_crypto_create_write_func,
|
||||||
&data,
|
&data,
|
||||||
errp);
|
errp);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue