[PATCH 18/27] storage: Move error messages onto a single line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/storage/storage_backend_disk.c |  3 +-
 src/storage/storage_backend_fs.c   |  3 +-
 src/storage/storage_backend_zfs.c  |  3 +-
 src/storage/storage_driver.c       | 21 +++++--------
 src/storage/storage_util.c         | 48 ++++++++++--------------------
 5 files changed, 26 insertions(+), 52 deletions(-)

diff --git a/src/storage/storage_backend_disk.c b/src/storage/storage_backend_disk.c
index 7466f0e234..996395de4a 100644
--- a/src/storage/storage_backend_disk.c
+++ b/src/storage/storage_backend_disk.c
@@ -659,8 +659,7 @@ virStorageBackendDiskPartFormat(virStoragePoolObj *pool,
                     *partFormat = g_strdup_printf("logical %s", partedFormat);
                 } else {
                     virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                                   _("no extended partition found and no "
-                                     "primary partition available"));
+                                   _("no extended partition found and no primary partition available"));
                     return -1;
                 }
                 break;
diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
index a80d228201..1851704d21 100644
--- a/src/storage/storage_backend_fs.c
+++ b/src/storage/storage_backend_fs.c
@@ -219,8 +219,7 @@ virStorageBackendFileSystemIsValid(virStoragePoolObj *pool)
                                _("missing source device"));
             else
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                               _("expected exactly 1 device for the "
-                                 "storage pool"));
+                               _("expected exactly 1 device for the storage pool"));
             return -1;
         }
     }
diff --git a/src/storage/storage_backend_zfs.c b/src/storage/storage_backend_zfs.c
index 4e243a738a..178b505e92 100644
--- a/src/storage/storage_backend_zfs.c
+++ b/src/storage/storage_backend_zfs.c
@@ -310,8 +310,7 @@ virStorageBackendZFSCreateVol(virStoragePoolObj *pool,
 
     if (vol->target.encryption != NULL) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       "%s", _("storage pool does not support encrypted "
-                               "volumes"));
+                       "%s", _("storage pool does not support encrypted volumes"));
         return -1;
     }
 
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index 5a9dcbd193..314fe930e0 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -1903,8 +1903,7 @@ storageVolCreateXML(virStoragePoolPtr pool,
 
     if (!voldef->target.capacity && !backend->buildVol) {
         virReportError(VIR_ERR_NO_SUPPORT,
-                       "%s", _("volume capacity required for this "
-                               "storage pool"));
+                       "%s", _("volume capacity required for this storage pool"));
         goto cleanup;
     }
 
@@ -1919,8 +1918,7 @@ storageVolCreateXML(virStoragePoolPtr pool,
 
     if (!backend->createVol) {
         virReportError(VIR_ERR_NO_SUPPORT,
-                       "%s", _("storage pool does not support volume "
-                               "creation"));
+                       "%s", _("storage pool does not support volume creation"));
         goto cleanup;
     }
 
@@ -2103,8 +2101,7 @@ storageVolCreateXMLFrom(virStoragePoolPtr pool,
 
     if (!backend->buildVolFrom) {
         virReportError(VIR_ERR_NO_SUPPORT,
-                       "%s", _("storage pool does not support"
-                               " volume creation from an existing volume"));
+                       "%s", _("storage pool does not support volume creation from an existing volume"));
         goto cleanup;
     }
 
@@ -2274,8 +2271,7 @@ virStorageBackendPloopRestoreDesc(char *path)
 
     if (virFileRemove(desc, 0, 0) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                       _("refresh ploop failed:"
-                         " unable to delete DiskDescriptor.xml"));
+                       _("refresh ploop failed: unable to delete DiskDescriptor.xml"));
         return -1;
     }
 
@@ -2497,16 +2493,14 @@ storageVolResize(virStorageVolPtr vol,
 
     if (abs_capacity < voldef->target.allocation) {
         virReportError(VIR_ERR_INVALID_ARG, "%s",
-                       _("can't shrink capacity below "
-                         "existing allocation"));
+                       _("can't shrink capacity below existing allocation"));
         goto cleanup;
     }
 
     if (abs_capacity < voldef->target.capacity &&
         !(flags & VIR_STORAGE_VOL_RESIZE_SHRINK)) {
         virReportError(VIR_ERR_INVALID_ARG, "%s",
-                       _("Can't shrink capacity below current "
-                         "capacity unless shrink flag explicitly specified"));
+                       _("Can't shrink capacity below current capacity unless shrink flag explicitly specified"));
         goto cleanup;
     }
 
@@ -2521,8 +2515,7 @@ storageVolResize(virStorageVolPtr vol,
 
     if (!backend->resizeVol) {
         virReportError(VIR_ERR_NO_SUPPORT, "%s",
-                       _("storage pool does not support changing of "
-                         "volume capacity"));
+                       _("storage pool does not support changing of volume capacity"));
         goto cleanup;
     }
 
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
index d39aa92eae..bf8de2475d 100644
--- a/src/storage/storage_util.c
+++ b/src/storage/storage_util.c
@@ -236,8 +236,7 @@ storageBackendCreateBlockFrom(virStoragePoolObj *pool G_GNUC_UNUSED,
 
     if (flags & VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                       _("metadata preallocation is not supported for block "
-                         "volumes"));
+                       _("metadata preallocation is not supported for block volumes"));
         return -1;
     }
 
@@ -389,8 +388,7 @@ storageBackendCreateRaw(virStoragePoolObj *pool,
 
     if (flags & VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                       _("metadata preallocation is not supported for raw "
-                         "volumes"));
+                       _("metadata preallocation is not supported for raw volumes"));
         return -1;
     }
 
@@ -571,8 +569,7 @@ storageBackendCreatePloop(virStoragePoolObj *pool G_GNUC_UNUSED,
 
     if (vol->target.encryption) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                       _("encrypted ploop volumes are not supported with "
-                         "ploop init"));
+                       _("encrypted ploop volumes are not supported with ploop init"));
         return -1;
     }
 
@@ -585,8 +582,7 @@ storageBackendCreatePloop(virStoragePoolObj *pool G_GNUC_UNUSED,
     create_tool = virFindFileInPath("ploop");
     if (!create_tool && !inputvol) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       "%s", _("unable to find ploop, please install "
-                               "ploop tools"));
+                       "%s", _("unable to find ploop, please install ploop tools"));
         return -1;
     }
 
@@ -899,8 +895,7 @@ storageBackendCreateQemuImgSetBacking(virStoragePoolObj *pool,
 
     if (info->preallocate) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                       _("metadata preallocation conflicts with backing"
-                         " store"));
+                       _("metadata preallocation conflicts with backing store"));
         return -1;
     }
 
@@ -1273,8 +1268,7 @@ storageBackendCreateQemuImgSecretPath(virStoragePoolObj *pool,
 
     if (enc->nsecrets != 1) {
         virReportError(VIR_ERR_INVALID_ARG, "%s",
-                       _("A single <secret type='passphrase'...> "
-                         "element is expected in encryption description"));
+                       _("A single <secret type='passphrase'...> element is expected in encryption description"));
         return NULL;
     }
 
@@ -1365,8 +1359,7 @@ storageBackendCreateQemuImg(virStoragePoolObj *pool,
     create_tool = virFindFileInPath("qemu-img");
     if (!create_tool) {
         virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                       _("creation of non-raw file images is "
-                         "not supported without qemu-img."));
+                       _("creation of non-raw file images is not supported without qemu-img."));
         return -1;
     }
 
@@ -2398,8 +2391,7 @@ virStorageBackendVolResizeLocal(virStoragePoolObj *pool,
     } else if (vol->target.format == VIR_STORAGE_FILE_RAW && vol->target.encryption) {
         if (pre_allocate) {
             virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
-                           _("preallocate is only supported for an "
-                             "unencrypted raw volume"));
+                           _("preallocate is only supported for an unencrypted raw volume"));
             return -1;
         }
 
@@ -2409,8 +2401,7 @@ virStorageBackendVolResizeLocal(virStoragePoolObj *pool,
     } else {
         if (pre_allocate) {
             virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
-                           _("preallocate is only supported for raw "
-                             "type volume"));
+                           _("preallocate is only supported for raw type volume"));
             return -1;
         }
 
@@ -2435,8 +2426,7 @@ storageBackendPloopHasSnapshots(char *path)
     snap_tool = virFindFileInPath("ploop");
     if (!snap_tool) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       "%s", _("unable to find ploop, please install "
-                               "ploop tools"));
+                       "%s", _("unable to find ploop, please install ploop tools"));
         return -1;
     }
 
@@ -2478,8 +2468,7 @@ virStorageBackendVolUploadLocal(virStoragePoolObj *pool G_GNUC_UNUSED,
             return -1;
         } else if (!has_snap) {
             virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                           _("can't upload volume, all existing snapshots"
-                             " will be lost"));
+                           _("can't upload volume, all existing snapshots will be lost"));
             return -1;
         }
 
@@ -2512,8 +2501,7 @@ virStorageBackendVolDownloadLocal(virStoragePoolObj *pool G_GNUC_UNUSED,
             return -1;
         } else if (!has_snap) {
             virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                           _("can't download volume, all existing snapshots"
-                             " will be lost"));
+                           _("can't download volume, all existing snapshots will be lost"));
             return -1;
         }
         path = g_strdup_printf("%s/root.hds", vol->target.path);
@@ -3161,8 +3149,7 @@ virStorageBackendBLKIDFindEmpty(const char *device,
 
     if (ret == 0 && blkid_do_probe(probe) != 1) {
         virReportError(VIR_ERR_STORAGE_PROBE_FAILED, "%s",
-                       _("Found additional probes to run, probing may "
-                         "be incorrect"));
+                       _("Found additional probes to run, probing may be incorrect"));
         ret = -1;
     }
 
@@ -3287,8 +3274,7 @@ virStorageBackendPARTEDValidLabel(const char *device,
     switch (check) {
     case VIR_STORAGE_PARTED_ERROR:
         virReportError(VIR_ERR_OPERATION_FAILED, "%s",
-                       _("Error checking for disk label, failed to get "
-                         "disk partition information"));
+                       _("Error checking for disk label, failed to get disk partition information"));
         break;
 
     case VIR_STORAGE_PARTED_MATCH:
@@ -3302,8 +3288,7 @@ virStorageBackendPARTEDValidLabel(const char *device,
 
     case VIR_STORAGE_PARTED_DIFFERENT:
         virReportError(VIR_ERR_OPERATION_FAILED, "%s",
-                       _("Known, but different label format present, "
-                         "requires build --overwrite"));
+                       _("Known, but different label format present, requires build --overwrite"));
         break;
 
     case VIR_STORAGE_PARTED_UNKNOWN:
@@ -3316,8 +3301,7 @@ virStorageBackendPARTEDValidLabel(const char *device,
 
     case VIR_STORAGE_PARTED_NOPTTYPE:
         virReportError(VIR_ERR_OPERATION_FAILED, "%s",
-                       _("Unable to determine Partition Type, "
-                         "requires build --overwrite"));
+                       _("Unable to determine Partition Type, requires build --overwrite"));
         break;
 
     case VIR_STORAGE_PARTED_PTTYPE_UNK:
-- 
2.41.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux