esx: 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:
Michal Privoznik 2023-08-24 17:03:58 +02:00
parent 37ad746839
commit c5235f68d6
6 changed files with 17 additions and 35 deletions

View File

@ -2916,8 +2916,7 @@ esxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
if (virtualMachine) { if (virtualMachine) {
/* FIXME */ /* FIXME */
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Domain already exists, editing existing domains is not " _("Domain already exists, editing existing domains is not supported yet"));
"supported yet"));
goto cleanup; goto cleanup;
} }
@ -2952,8 +2951,7 @@ esxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
*/ */
if (def->ndisks < 1) { if (def->ndisks < 1) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Domain XML doesn't contain any disks, cannot deduce " _("Domain XML doesn't contain any disks, cannot deduce datastore and path for VMX file"));
"datastore and path for VMX file"));
goto cleanup; goto cleanup;
} }
@ -2967,16 +2965,14 @@ esxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
if (!disk) { if (!disk) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Domain XML doesn't contain any file-based harddisks, " _("Domain XML doesn't contain any file-based harddisks, cannot deduce datastore and path for VMX file"));
"cannot deduce datastore and path for VMX file"));
goto cleanup; goto cleanup;
} }
src = virDomainDiskGetSource(disk); src = virDomainDiskGetSource(disk);
if (!src) { if (!src) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("First file-based harddisk has no source, cannot deduce " _("First file-based harddisk has no source, cannot deduce datastore and path for VMX file"));
"datastore and path for VMX file"));
goto cleanup; goto cleanup;
} }
@ -3241,8 +3237,7 @@ esxDomainSetAutostart(virDomainPtr domain, int autostart)
powerInfo = powerInfo->_next) { powerInfo = powerInfo->_next) {
if (STRNEQ(powerInfo->key->value, virtualMachine->obj->value)) { if (STRNEQ(powerInfo->key->value, virtualMachine->obj->value)) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("Cannot enable general autostart option " _("Cannot enable general autostart option without affecting other domains"));
"without affecting other domains"));
goto cleanup; goto cleanup;
} }
} }
@ -3685,8 +3680,7 @@ esxDomainMigratePerform(virDomainPtr domain,
if (STRCASENEQ(priv->vCenter->ipAddress, parsedUri->server)) { if (STRCASENEQ(priv->vCenter->ipAddress, parsedUri->server)) {
virReportError(VIR_ERR_INVALID_ARG, "%s", virReportError(VIR_ERR_INVALID_ARG, "%s",
_("Migration source and destination have to refer to " _("Migration source and destination have to refer to the same vCenter"));
"the same vCenter"));
goto cleanup; goto cleanup;
} }
@ -3734,8 +3728,7 @@ esxDomainMigratePerform(virDomainPtr domain,
eventList->fullFormattedMessage); eventList->fullFormattedMessage);
} else { } else {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not migrate domain, validation reported a " _("Could not migrate domain, validation reported a problem"));
"problem"));
} }
goto cleanup; goto cleanup;

View File

@ -311,8 +311,7 @@ esxNetworkDefineXMLFlags(virConnectPtr conn, const char *xml,
if (hostVirtualSwitch) { if (hostVirtualSwitch) {
/* FIXME */ /* FIXME */
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("HostVirtualSwitch already exists, editing existing " _("HostVirtualSwitch already exists, editing existing ones is not supported yet"));
"ones is not supported yet"));
goto cleanup; goto cleanup;
} }

View File

@ -726,8 +726,7 @@ esxStorageVolLookupByKey(virConnectPtr conn, const char *key)
if (!priv->primary->hasQueryVirtualDiskUuid) { if (!priv->primary->hasQueryVirtualDiskUuid) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("QueryVirtualDiskUuid not available, " _("QueryVirtualDiskUuid not available, cannot lookup storage volume by UUID"));
"cannot lookup storage volume by UUID"));
return NULL; return NULL;
} }

View File

@ -119,8 +119,7 @@ esxUtil_ParseUri(esxUtil_ParsedUri **parsedUri, virURI *uri)
if ((tmp = strchr((*parsedUri)->proxy_hostname, ':'))) { if ((tmp = strchr((*parsedUri)->proxy_hostname, ':'))) {
if (tmp == (*parsedUri)->proxy_hostname) { if (tmp == (*parsedUri)->proxy_hostname) {
virReportError(VIR_ERR_INVALID_ARG, "%s", virReportError(VIR_ERR_INVALID_ARG, "%s",
_("Query parameter 'proxy' doesn't contain a " _("Query parameter 'proxy' doesn't contain a hostname"));
"hostname"));
goto cleanup; goto cleanup;
} }

View File

@ -253,8 +253,7 @@ esxVI_CURL_Perform(esxVI_CURL *curl, const char *url)
if (responseCode < 0) { if (responseCode < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("curl_easy_getinfo(CURLINFO_RESPONSE_CODE) returned a " _("curl_easy_getinfo(CURLINFO_RESPONSE_CODE) returned a negative response code"));
"negative response code"));
return -1; return -1;
} }
@ -674,15 +673,13 @@ esxVI_MultiCURL_Remove(esxVI_MultiCURL *multi, esxVI_CURL *curl)
{ {
if (!curl->handle) { if (!curl->handle) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Cannot remove uninitialized CURL handle from a " _("Cannot remove uninitialized CURL handle from a multi handle"));
"multi handle"));
return -1; return -1;
} }
if (!curl->multi) { if (!curl->multi) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Cannot remove CURL handle from a multi handle when it " _("Cannot remove CURL handle from a multi handle when it wasn't added before"));
"wasn't added before"));
return -1; return -1;
} }
@ -1909,8 +1906,7 @@ esxVI_EnsureSession(esxVI_Context *ctx)
} }
} else if (STRNEQ(ctx->session->key, currentSession->key)) { } else if (STRNEQ(ctx->session->key, currentSession->key)) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Key of the current session differs from the key at " _("Key of the current session differs from the key at last login"));
"last login"));
goto cleanup; goto cleanup;
} }
@ -4220,13 +4216,10 @@ esxVI_WaitForTaskCompletion(esxVI_Context *ctx,
if (taskInfo->cancelable == esxVI_Boolean_True) { if (taskInfo->cancelable == esxVI_Boolean_True) {
if (esxVI_CancelTask(ctx, task) < 0 && blocked) { if (esxVI_CancelTask(ctx, task) < 0 && blocked) {
VIR_ERROR(_("Cancelable task is blocked by an " VIR_ERROR(_("Cancelable task is blocked by an unanswered question but cancellation failed"));
"unanswered question but cancellation "
"failed"));
} }
} else if (blocked) { } else if (blocked) {
VIR_ERROR(_("Non-cancelable task is blocked by an " VIR_ERROR(_("Non-cancelable task is blocked by an unanswered question"));
"unanswered question"));
} }
/* FIXME: Enable error reporting here again */ /* FIXME: Enable error reporting here again */

View File

@ -1444,8 +1444,7 @@ esxVI_DateTime_Deserialize(xmlNodePtr node, esxVI_DateTime **dateTime)
if (!(*dateTime)->value) { if (!(*dateTime)->value) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("XML node doesn't contain text, expecting an " _("XML node doesn't contain text, expecting an xsd:dateTime value"));
"xsd:dateTime value"));
goto failure; goto failure;
} }