mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
storage: Move error messages onto a single line
Error messages are exempt from the 80 columns rule. Move them onto one line. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
e0259b5752
commit
5674fa48d1
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user