]> xenbits.xensource.com Git - libvirt.git/commitdiff
storage: Cleanup improper VIR_ERR_NO_SUPPORT use
authorOsier Yang <jyang@redhat.com>
Tue, 23 Aug 2011 08:31:03 +0000 (16:31 +0800)
committerOsier Yang <jyang@redhat.com>
Tue, 23 Aug 2011 08:31:03 +0000 (16:31 +0800)
src/storage/storage_backend.c
src/storage/storage_backend_disk.c
src/storage/storage_backend_fs.c
src/storage/storage_backend_logical.c

index 889f5305cc430eee601bc8909226d41c52bbbd7e..72b37a1ba38e64ce893356f812aa504f5f8db304 100644 (file)
@@ -387,7 +387,7 @@ virStorageBackendCreateRaw(virConnectPtr conn ATTRIBUTE_UNUSED,
     virCheckFlags(0, -1);
 
     if (vol->target.encryption != NULL) {
-        virStorageReportError(VIR_ERR_NO_SUPPORT,
+        virStorageReportError(VIR_ERR_OPERATION_INVALID,
                               "%s", _("storage pool does not support encrypted "
                                       "volumes"));
         goto cleanup;
@@ -461,7 +461,7 @@ virStorageGenerateQcowEncryption(virConnectPtr conn,
         conn->secretDriver->lookupByUUID == NULL ||
         conn->secretDriver->defineXML == NULL ||
         conn->secretDriver->setValue == NULL) {
-        virStorageReportError(VIR_ERR_NO_SUPPORT, "%s",
+        virStorageReportError(VIR_ERR_OPERATION_INVALID, "%s",
                               _("secret storage not supported"));
         goto cleanup;
     }
@@ -740,7 +740,7 @@ virStorageBackendCreateQemuImg(virConnectPtr conn,
 
         if (vol->target.format != VIR_STORAGE_FILE_QCOW &&
             vol->target.format != VIR_STORAGE_FILE_QCOW2) {
-            virStorageReportError(VIR_ERR_NO_SUPPORT,
+            virStorageReportError(VIR_ERR_OPERATION_INVALID,
                                   _("qcow volume encryption unsupported with "
                                     "volume format %s"), type);
             return -1;
@@ -748,7 +748,7 @@ virStorageBackendCreateQemuImg(virConnectPtr conn,
         enc = vol->target.encryption;
         if (enc->format != VIR_STORAGE_ENCRYPTION_FORMAT_QCOW &&
             enc->format != VIR_STORAGE_ENCRYPTION_FORMAT_DEFAULT) {
-            virStorageReportError(VIR_ERR_NO_SUPPORT,
+            virStorageReportError(VIR_ERR_OPERATION_INVALID,
                                   _("unsupported volume encryption format %d"),
                                   vol->target.encryption->format);
             return -1;
@@ -880,13 +880,13 @@ virStorageBackendCreateQcowCreate(virConnectPtr conn ATTRIBUTE_UNUSED,
         return -1;
     }
     if (vol->backingStore.path != NULL) {
-        virStorageReportError(VIR_ERR_NO_SUPPORT, "%s",
+        virStorageReportError(VIR_ERR_OPERATION_INVALID, "%s",
                               _("copy-on-write image not supported with "
                                       "qcow-create"));
         return -1;
     }
     if (vol->target.encryption != NULL) {
-        virStorageReportError(VIR_ERR_NO_SUPPORT,
+        virStorageReportError(VIR_ERR_OPERATION_INVALID,
                               "%s", _("encrypted volumes not supported with "
                                       "qcow-create"));
         return -1;
index 82b41efcda905979020ed93e48f6b64d7cf668a7..0eb34b9ca6942400cc37df403a0614acb0cc6ea3 100644 (file)
@@ -574,7 +574,7 @@ virStorageBackendDiskCreateVol(virConnectPtr conn ATTRIBUTE_UNUSED,
     };
 
     if (vol->target.encryption != NULL) {
-        virStorageReportError(VIR_ERR_NO_SUPPORT,
+        virStorageReportError(VIR_ERR_OPERATION_INVALID,
                               "%s", _("storage pool does not support encrypted "
                                       "volumes"));
         return -1;
index ff5afaa78a9e15448835a53a3843e9b897034b68..4f53d3fcf800b62532640008aa3e5757918c3f1f 100644 (file)
@@ -866,7 +866,7 @@ _virStorageBackendFileSystemVolBuild(virConnectPtr conn,
 
     if (inputvol) {
         if (vol->target.encryption != NULL) {
-            virStorageReportError(VIR_ERR_NO_SUPPORT,
+            virStorageReportError(VIR_ERR_OPERATION_INVALID,
                                   "%s", _("storage pool does not support "
                                           "building encrypted volumes from "
                                           "other volumes"));
index ca4166da2b4d162542c1e1e7af63671ee4bf81b4..a35b360251a5c76ab9f9b19f200b2b0c7a57d888 100644 (file)
@@ -584,7 +584,7 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn,
     const char **cmdargv = cmdargvnew;
 
     if (vol->target.encryption != NULL) {
-        virStorageReportError(VIR_ERR_NO_SUPPORT,
+        virStorageReportError(VIR_ERR_OPERATION_INVALID,
                               "%s", _("storage pool does not support encrypted "
                                       "volumes"));
         return -1;