]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: block: Introduce helpers for properly testing for 'raw' and 'luks' images
authorPeter Krempa <pkrempa@redhat.com>
Tue, 12 Dec 2023 16:11:45 +0000 (17:11 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 14 Dec 2023 15:03:40 +0000 (16:03 +0100)
commit04b94593d172e1497e4accce812d4b5c5f5dfe04
treeec68c9b58ae65e434f966840862ad4e28354b22d
parentaded3c622f6acc14ca83ada6082845020b4bfa35
qemu: block: Introduce helpers for properly testing for 'raw' and 'luks' images

Unfortunately a LUKS image to be decrypted by qemu has
VIR_STORAGE_FILE_RAW as format, but has encryption properties populated.

Many places in the code don't check it properly and also don't check
properly whether the image is indeed LUKS to be decrypted by qemu.

Introduce helpers which will simplify this task.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Spellchecked-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_block.c
src/qemu/qemu_block.h