mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
storage: Cleanup improper VIR_ERR_NO_SUPPORT use
This commit is contained in:
parent
d4b53ef6cf
commit
0376f4a69b
@ -387,7 +387,7 @@ virStorageBackendCreateRaw(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
virCheckFlags(0, -1);
|
virCheckFlags(0, -1);
|
||||||
|
|
||||||
if (vol->target.encryption != NULL) {
|
if (vol->target.encryption != NULL) {
|
||||||
virStorageReportError(VIR_ERR_NO_SUPPORT,
|
virStorageReportError(VIR_ERR_OPERATION_INVALID,
|
||||||
"%s", _("storage pool does not support encrypted "
|
"%s", _("storage pool does not support encrypted "
|
||||||
"volumes"));
|
"volumes"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -461,7 +461,7 @@ virStorageGenerateQcowEncryption(virConnectPtr conn,
|
|||||||
conn->secretDriver->lookupByUUID == NULL ||
|
conn->secretDriver->lookupByUUID == NULL ||
|
||||||
conn->secretDriver->defineXML == NULL ||
|
conn->secretDriver->defineXML == NULL ||
|
||||||
conn->secretDriver->setValue == NULL) {
|
conn->secretDriver->setValue == NULL) {
|
||||||
virStorageReportError(VIR_ERR_NO_SUPPORT, "%s",
|
virStorageReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||||
_("secret storage not supported"));
|
_("secret storage not supported"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@ -740,7 +740,7 @@ virStorageBackendCreateQemuImg(virConnectPtr conn,
|
|||||||
|
|
||||||
if (vol->target.format != VIR_STORAGE_FILE_QCOW &&
|
if (vol->target.format != VIR_STORAGE_FILE_QCOW &&
|
||||||
vol->target.format != VIR_STORAGE_FILE_QCOW2) {
|
vol->target.format != VIR_STORAGE_FILE_QCOW2) {
|
||||||
virStorageReportError(VIR_ERR_NO_SUPPORT,
|
virStorageReportError(VIR_ERR_OPERATION_INVALID,
|
||||||
_("qcow volume encryption unsupported with "
|
_("qcow volume encryption unsupported with "
|
||||||
"volume format %s"), type);
|
"volume format %s"), type);
|
||||||
return -1;
|
return -1;
|
||||||
@ -748,7 +748,7 @@ virStorageBackendCreateQemuImg(virConnectPtr conn,
|
|||||||
enc = vol->target.encryption;
|
enc = vol->target.encryption;
|
||||||
if (enc->format != VIR_STORAGE_ENCRYPTION_FORMAT_QCOW &&
|
if (enc->format != VIR_STORAGE_ENCRYPTION_FORMAT_QCOW &&
|
||||||
enc->format != VIR_STORAGE_ENCRYPTION_FORMAT_DEFAULT) {
|
enc->format != VIR_STORAGE_ENCRYPTION_FORMAT_DEFAULT) {
|
||||||
virStorageReportError(VIR_ERR_NO_SUPPORT,
|
virStorageReportError(VIR_ERR_OPERATION_INVALID,
|
||||||
_("unsupported volume encryption format %d"),
|
_("unsupported volume encryption format %d"),
|
||||||
vol->target.encryption->format);
|
vol->target.encryption->format);
|
||||||
return -1;
|
return -1;
|
||||||
@ -880,13 +880,13 @@ virStorageBackendCreateQcowCreate(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (vol->backingStore.path != NULL) {
|
if (vol->backingStore.path != NULL) {
|
||||||
virStorageReportError(VIR_ERR_NO_SUPPORT, "%s",
|
virStorageReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||||
_("copy-on-write image not supported with "
|
_("copy-on-write image not supported with "
|
||||||
"qcow-create"));
|
"qcow-create"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (vol->target.encryption != NULL) {
|
if (vol->target.encryption != NULL) {
|
||||||
virStorageReportError(VIR_ERR_NO_SUPPORT,
|
virStorageReportError(VIR_ERR_OPERATION_INVALID,
|
||||||
"%s", _("encrypted volumes not supported with "
|
"%s", _("encrypted volumes not supported with "
|
||||||
"qcow-create"));
|
"qcow-create"));
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -574,7 +574,7 @@ virStorageBackendDiskCreateVol(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (vol->target.encryption != NULL) {
|
if (vol->target.encryption != NULL) {
|
||||||
virStorageReportError(VIR_ERR_NO_SUPPORT,
|
virStorageReportError(VIR_ERR_OPERATION_INVALID,
|
||||||
"%s", _("storage pool does not support encrypted "
|
"%s", _("storage pool does not support encrypted "
|
||||||
"volumes"));
|
"volumes"));
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -866,7 +866,7 @@ _virStorageBackendFileSystemVolBuild(virConnectPtr conn,
|
|||||||
|
|
||||||
if (inputvol) {
|
if (inputvol) {
|
||||||
if (vol->target.encryption != NULL) {
|
if (vol->target.encryption != NULL) {
|
||||||
virStorageReportError(VIR_ERR_NO_SUPPORT,
|
virStorageReportError(VIR_ERR_OPERATION_INVALID,
|
||||||
"%s", _("storage pool does not support "
|
"%s", _("storage pool does not support "
|
||||||
"building encrypted volumes from "
|
"building encrypted volumes from "
|
||||||
"other volumes"));
|
"other volumes"));
|
||||||
|
@ -584,7 +584,7 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn,
|
|||||||
const char **cmdargv = cmdargvnew;
|
const char **cmdargv = cmdargvnew;
|
||||||
|
|
||||||
if (vol->target.encryption != NULL) {
|
if (vol->target.encryption != NULL) {
|
||||||
virStorageReportError(VIR_ERR_NO_SUPPORT,
|
virStorageReportError(VIR_ERR_OPERATION_INVALID,
|
||||||
"%s", _("storage pool does not support encrypted "
|
"%s", _("storage pool does not support encrypted "
|
||||||
"volumes"));
|
"volumes"));
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user