mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00:00
crypto: expose encryption sector size in APIs
While current encryption schemes all have a fixed sector size of 512 bytes, this is not guaranteed to be the case in future. Expose the sector size in the APIs so the block layer can remove assumptions about fixed 512 byte sectors. Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20170927125340.12360-3-berrange@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
committed by
Max Reitz
parent
161253e2d0
commit
850f49de9b
@@ -170,6 +170,12 @@ uint64_t qcrypto_block_get_payload_offset(QCryptoBlock *block)
|
||||
}
|
||||
|
||||
|
||||
uint64_t qcrypto_block_get_sector_size(QCryptoBlock *block)
|
||||
{
|
||||
return block->sector_size;
|
||||
}
|
||||
|
||||
|
||||
void qcrypto_block_free(QCryptoBlock *block)
|
||||
{
|
||||
if (!block) {
|
||||
|
||||
Reference in New Issue
Block a user