reflink_copy = true;
- if (vol->target.encryption != NULL) {
+ if (vol->target.encryption) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("storage pool does not support encrypted volumes"));
goto cleanup;
return -1;
}
- if (vol->target.encryption != NULL) {
+ if (vol->target.encryption) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("encrypted ploop volumes are not supported with "
"ploop init"));
.format = vol->target.format,
.path = vol->target.path,
.allocation = vol->target.allocation,
- .encryption = vol->target.encryption != NULL,
+ .encryption = !!vol->target.encryption,
.preallocate = !!(flags & VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA),
.compat = vol->target.compat,
.features = vol->target.features,
_("format features only available with qcow2"));
return NULL;
}
- if (info.format == VIR_STORAGE_FILE_RAW &&
- vol->target.encryption != NULL) {
+ if (info.format == VIR_STORAGE_FILE_RAW && vol->target.encryption) {
if (inputvol) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("cannot use inputvol with encrypted raw volume"));
if (info.backingPath)
virCommandAddArgList(cmd, "-b", info.backingPath, NULL);
- if (info.format == VIR_STORAGE_FILE_RAW &&
- vol->target.encryption != NULL &&
+ if (info.format == VIR_STORAGE_FILE_RAW && vol->target.encryption &&
vol->target.encryption->format == VIR_STORAGE_ENCRYPTION_FORMAT_LUKS) {
if (virAsprintf(&info.secretAlias, "%s_luks0", vol->name) < 0)
goto error;
*/
if ((vol->type == VIR_STORAGE_VOL_FILE &&
(vol->target.format != VIR_STORAGE_FILE_RAW ||
- vol->target.encryption != NULL)) ||
+ vol->target.encryption)) ||
(inputvol->type == VIR_STORAGE_VOL_FILE &&
(inputvol->target.format != VIR_STORAGE_FILE_RAW ||
- inputvol->target.encryption != NULL))) {
+ inputvol->target.encryption))) {
return storageBackendCreateQemuImg;
}
virStorageBackendBuildVolFrom create_func;
if (inputvol) {
- if (vol->target.encryption != NULL) {
+ if (vol->target.encryption) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
"%s", _("storage pool does not support "
"building encrypted volumes from "