mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
storage_util: Some code cleanup
Perform some code cleanup in areas that are about to be altered. Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
33e75120cc
commit
9cfd507367
@ -874,7 +874,7 @@ storageBackendCreateQemuImgOpts(virStorageEncryptionInfoDefPtr enc,
|
|||||||
|
|
||||||
/* storageBackendCreateQemuImgCheckEncryption:
|
/* storageBackendCreateQemuImgCheckEncryption:
|
||||||
* @format: format of file found
|
* @format: format of file found
|
||||||
* @conn: pointer to connection
|
* @type: TypeToString of format.type
|
||||||
* @vol: pointer to volume def
|
* @vol: pointer to volume def
|
||||||
*
|
*
|
||||||
* Ensure the proper setup for encryption.
|
* Ensure the proper setup for encryption.
|
||||||
@ -1199,11 +1199,9 @@ virStorageBackendCreateQemuImgCmdFromVol(virStoragePoolObjPtr pool,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (info.encryption &&
|
if (info.encryption &&
|
||||||
storageBackendCreateQemuImgCheckEncryption(info.format, type,
|
storageBackendCreateQemuImgCheckEncryption(info.format, type, vol) < 0)
|
||||||
vol) < 0)
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
||||||
/* Size in KB */
|
/* Size in KB */
|
||||||
info.size_arg = VIR_DIV_UP(vol->target.capacity, 1024);
|
info.size_arg = VIR_DIV_UP(vol->target.capacity, 1024);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user