Error messages are exempt from the 80 columns rule. Move them
onto one line.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/rpc/virnetclient.c | 9 +++----
src/rpc/virnetlibsshsession.c | 28 +++++++---------------
src/rpc/virnetserver.c | 9 +++----
src/rpc/virnetserverclient.c | 3 +--
src/rpc/virnetsshsession.c | 45 ++++++++++++-----------------------
src/rpc/virnettlscontext.c | 6 +----
6 files changed, 32 insertions(+), 68 deletions(-)
diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c
index 18f87653f5..4ab8af68c5 100644
--- a/src/rpc/virnetclient.c
+++ b/src/rpc/virnetclient.c
@@ -1011,8 +1011,7 @@ int virNetClientSetTLSSession(virNetClient *client,
}
if (len != 1 || buf[0] != '\1') {
virReportError(VIR_ERR_RPC, "%s",
- _("server verification (of our certificate or IP "
- "address) failed"));
+ _("server verification (of our certificate or IP address)
failed"));
goto error;
}
@@ -2069,15 +2068,13 @@ virNetClientCallNew(virNetMessage *msg,
(msg->bufferLength != 0) &&
(msg->header.status == VIR_NET_CONTINUE)) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("Attempt to send an asynchronous message with"
- " a synchronous reply"));
+ _("Attempt to send an asynchronous message with a synchronous
reply"));
goto error;
}
if (expectReply && nonBlock) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("Attempt to send a non-blocking message with"
- " a synchronous reply"));
+ _("Attempt to send a non-blocking message with a synchronous
reply"));
goto error;
}
diff --git a/src/rpc/virnetlibsshsession.c b/src/rpc/virnetlibsshsession.c
index 8cb57e857f..6632e4a9ef 100644
--- a/src/rpc/virnetlibsshsession.c
+++ b/src/rpc/virnetlibsshsession.c
@@ -195,8 +195,7 @@ virLibsshServerKeyAsString(virNetLibsshSession *sess)
if (ssh_get_server_publickey(sess->session, &key) != SSH_OK) {
virReportError(VIR_ERR_LIBSSH, "%s",
- _("failed to get the key of the current "
- "session"));
+ _("failed to get the key of the current session"));
return NULL;
}
@@ -261,8 +260,7 @@ virNetLibsshCheckHostKey(virNetLibsshSession *sess)
/* host key verification failed */
virReportError(VIR_ERR_AUTH_FAILED,
- _("!!! SSH HOST KEY VERIFICATION FAILED !!!: Identity of host
'%1$s:%2$d' differs from stored identity. "
- "Please verify the new host key '%3$s' to avoid
possible man in the middle attack. The key is stored in '%4$s'."),
+ _("!!! SSH HOST KEY VERIFICATION FAILED !!!: Identity of host
'%1$s:%2$d' differs from stored identity. Please verify the new host key
'%3$s' to avoid possible man in the middle attack. The key is stored in
'%4$s'."),
sess->hostname, sess->port,
keyhashstr, sess->knownHostsFile);
@@ -279,8 +277,7 @@ virNetLibsshCheckHostKey(virNetLibsshSession *sess)
/* ask to add the key */
if (!sess->cred || !sess->cred->cb) {
virReportError(VIR_ERR_LIBSSH, "%s",
- _("No user interaction callback provided: "
- "Can't verify the session host key"));
+ _("No user interaction callback provided: Can't
verify the session host key"));
return -1;
}
@@ -355,8 +352,7 @@ virNetLibsshAuthenticatePrivkeyCb(const char *prompt,
/* request user's key password */
if (!sess->cred || !sess->cred->cb) {
virReportError(VIR_ERR_LIBSSH, "%s",
- _("No user interaction callback provided: "
- "Can't retrieve private key passphrase"));
+ _("No user interaction callback provided: Can't retrieve
private key passphrase"));
return -1;
}
@@ -505,8 +501,7 @@ virNetLibsshAuthenticatePassword(virNetLibsshSession *sess)
/* password authentication with interactive password request */
if (!sess->cred || !sess->cred->cb) {
virReportError(VIR_ERR_LIBSSH, "%s",
- _("Can't perform authentication: "
- "Authentication callback not provided"));
+ _("Can't perform authentication: Authentication callback
not provided"));
return SSH_AUTH_ERROR;
}
@@ -567,9 +562,7 @@ virNetLibsshAuthenticateKeyboardInteractive(virNetLibsshSession
*sess,
/* request user's key password */
if (!sess->cred || !sess->cred->cb) {
virReportError(VIR_ERR_LIBSSH, "%s",
- _("No user interaction callback provided: "
- "Can't get input from keyboard interactive "
- "authentication"));
+ _("No user interaction callback provided: Can't get input
from keyboard interactive authentication"));
return SSH_AUTH_ERROR;
}
@@ -738,12 +731,10 @@ virNetLibsshAuthenticate(virNetLibsshSession *sess)
errmsg);
} else if (no_method && !auth_failed) {
virReportError(VIR_ERR_AUTH_FAILED, "%s",
- _("None of the requested authentication methods "
- "are supported by the server"));
+ _("None of the requested authentication methods are supported
by the server"));
} else {
virReportError(VIR_ERR_AUTH_FAILED, "%s",
- _("All provided authentication methods with credentials
"
- "were rejected by the server"));
+ _("All provided authentication methods with credentials were
rejected by the server"));
}
return -1;
@@ -803,8 +794,7 @@ virNetLibsshValidateConfig(virNetLibsshSession *sess)
}
if (!has_auths) {
virReportError(VIR_ERR_LIBSSH, "%s",
- _("No authentication methods and credentials "
- "provided"));
+ _("No authentication methods and credentials
provided"));
return -1;
}
diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c
index 7233629f22..770476c1a6 100644
--- a/src/rpc/virnetserver.c
+++ b/src/rpc/virnetserver.c
@@ -372,8 +372,7 @@ virNetServerNew(const char *name,
if (max_clients < max_anonymous_clients) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("The overall maximum number of clients must not be less
"
- "than the number of clients waiting for
authentication"));
+ _("The overall maximum number of clients must not be less
than the number of clients waiting for authentication"));
return NULL;
}
@@ -458,8 +457,7 @@ virNetServerNewPostExecRestart(virJSONValue *object,
}
if (max_clients < max_anonymous_clients) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("The overall maximum number of clients must not be less
"
- "than the number of clients waiting for
authentication"));
+ _("The overall maximum number of clients must not be less
than the number of clients waiting for authentication"));
return NULL;
}
} else {
@@ -1127,8 +1125,7 @@ virNetServerSetClientLimits(virNetServer *srv,
if (max < max_unauth) {
virReportError(VIR_ERR_INVALID_ARG, "%s",
- _("The overall maximum number of clients must not be less
"
- "than the number of clients waiting for
authentication"));
+ _("The overall maximum number of clients must not be less
than the number of clients waiting for authentication"));
return -1;
}
diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c
index c0c018b6be..355aab4b04 100644
--- a/src/rpc/virnetserverclient.c
+++ b/src/rpc/virnetserverclient.c
@@ -531,8 +531,7 @@ virNetServerClient *virNetServerClientNewPostExecRestart(virNetServer
*srv,
} else {
if (virJSONValueObjectGetNumberLong(object, "conn_time",
×tamp) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("Malformed conn_time field in JSON "
- "state document"));
+ _("Malformed conn_time field in JSON state
document"));
return NULL;
}
}
diff --git a/src/rpc/virnetsshsession.c b/src/rpc/virnetsshsession.c
index 16d420467e..316521d4cf 100644
--- a/src/rpc/virnetsshsession.c
+++ b/src/rpc/virnetsshsession.c
@@ -307,8 +307,7 @@ virNetSSHCheckHostKey(virNetSSHSession *sess)
/* ask to add the key */
if (!sess->cred || !sess->cred->cb) {
virReportError(VIR_ERR_SSH, "%s",
- _("No user interaction callback provided: "
- "Can't verify the session host key"));
+ _("No user interaction callback provided: Can't
verify the session host key"));
return -1;
}
@@ -320,8 +319,7 @@ virNetSSHCheckHostKey(virNetSSHSession *sess)
if (i == sess->cred->ncredtype) {
virReportError(VIR_ERR_SSH, "%s",
- _("no suitable callback for host key "
- "verification"));
+ _("no suitable callback for host key
verification"));
return -1;
}
@@ -348,8 +346,7 @@ virNetSSHCheckHostKey(virNetSSHSession *sess)
if (sess->cred->cb(&askKey, 1, sess->cred->cbdata)) {
virReportError(VIR_ERR_SSH, "%s",
- _("failed to retrieve decision to accept "
- "host key"));
+ _("failed to retrieve decision to accept host
key"));
tmp = (char*)askKey.prompt;
VIR_FREE(tmp);
VIR_FREE(keyhashstr);
@@ -455,8 +452,7 @@ virNetSSHCheckHostKey(virNetSSHSession *sess)
case LIBSSH2_KNOWNHOST_CHECK_MISMATCH:
/* host key verification failed */
virReportError(VIR_ERR_AUTH_FAILED,
- _("!!! SSH HOST KEY VERIFICATION FAILED !!!: Identity of host
'%1$s:%2$d' differs from stored identity. "
- "Please verify the new host key '%3$s' to avoid
possible man in the middle attack. The key is stored in '%4$s'."),
+ _("!!! SSH HOST KEY VERIFICATION FAILED !!!: Identity of host
'%1$s:%2$d' differs from stored identity. Please verify the new host key
'%3$s' to avoid possible man in the middle attack. The key is stored in
'%4$s'."),
sess->hostname, sess->port,
knownHostEntry->key, sess->knownHostsFile);
return -1;
@@ -532,12 +528,10 @@ virNetSSHAuthenticateAgent(virNetSSHSession *sess)
if (ret == 1) {
if (no_identity) {
virReportError(VIR_ERR_AUTH_FAILED, "%s",
- _("SSH Agent did not provide any "
- "authentication identity"));
+ _("SSH Agent did not provide any authentication
identity"));
} else {
virReportError(VIR_ERR_AUTH_FAILED, "%s",
- _("All identities provided by the SSH Agent "
- "were rejected"));
+ _("All identities provided by the SSH Agent were
rejected"));
}
return 1;
}
@@ -589,8 +583,7 @@ virNetSSHAuthenticatePrivkey(virNetSSHSession *sess,
/* request user's key password */
if (!sess->cred || !sess->cred->cb) {
virReportError(VIR_ERR_SSH, "%s",
- _("No user interaction callback provided: "
- "Can't retrieve private key passphrase"));
+ _("No user interaction callback provided: Can't retrieve
private key passphrase"));
return -1;
}
@@ -615,8 +608,7 @@ virNetSSHAuthenticatePrivkey(virNetSSHSession *sess,
if (sess->cred->cb(&retr_passphrase, 1, sess->cred->cbdata)) {
virReportError(VIR_ERR_SSH, "%s",
- _("failed to retrieve private key passphrase: "
- "callback has failed"));
+ _("failed to retrieve private key passphrase: callback has
failed"));
tmp = (char *)retr_passphrase.prompt;
VIR_FREE(tmp);
return -1;
@@ -671,8 +663,7 @@ virNetSSHAuthenticatePassword(virNetSSHSession *sess)
/* password authentication with interactive password request */
if (!sess->cred || !sess->cred->cb) {
virReportError(VIR_ERR_SSH, "%s",
- _("Can't perform authentication: "
- "Authentication callback not provided"));
+ _("Can't perform authentication: Authentication callback
not provided"));
goto cleanup;
}
@@ -732,8 +723,7 @@ virNetSSHAuthenticateKeyboardInteractive(virNetSSHSession *sess,
if (!sess->cred || !sess->cred->cb) {
virReportError(VIR_ERR_SSH, "%s",
- _("Can't perform keyboard-interactive authentication:
"
- "Authentication callback not provided"));
+ _("Can't perform keyboard-interactive authentication:
Authentication callback not provided"));
return -1;
}
@@ -748,8 +738,7 @@ virNetSSHAuthenticateKeyboardInteractive(virNetSSHSession *sess,
switch (sess->authCbErr) {
case VIR_NET_SSH_AUTHCB_NO_METHOD:
virReportError(VIR_ERR_SSH, "%s",
- _("no suitable method to retrieve "
- "authentication credentials"));
+ _("no suitable method to retrieve authentication
credentials"));
return -1;
case VIR_NET_SSH_AUTHCB_OOM:
/* OOM error already reported */
@@ -801,8 +790,7 @@ virNetSSHAuthenticate(virNetSSHSession *sess)
if (!sess->nauths) {
virReportError(VIR_ERR_SSH, "%s",
- _("No authentication methods and credentials "
- "provided"));
+ _("No authentication methods and credentials
provided"));
return -1;
}
@@ -866,12 +854,10 @@ virNetSSHAuthenticate(virNetSSHSession *sess)
/* pass through the error */
} else if (no_method && !auth_failed) {
virReportError(VIR_ERR_AUTH_FAILED, "%s",
- _("None of the requested authentication methods "
- "are supported by the server"));
+ _("None of the requested authentication methods are supported
by the server"));
} else {
virReportError(VIR_ERR_AUTH_FAILED, "%s",
- _("All provided authentication methods with credentials
"
- "were rejected by the server"));
+ _("All provided authentication methods with credentials were
rejected by the server"));
}
return -1;
@@ -914,8 +900,7 @@ virNetSSHValidateConfig(virNetSSHSession *sess)
{
if (sess->nauths == 0) {
virReportError(VIR_ERR_SSH, "%s",
- _("No authentication methods and credentials "
- "provided"));
+ _("No authentication methods and credentials
provided"));
return -1;
}
diff --git a/src/rpc/virnettlscontext.c b/src/rpc/virnettlscontext.c
index 1939fe5d6e..dc60244927 100644
--- a/src/rpc/virnettlscontext.c
+++ b/src/rpc/virnettlscontext.c
@@ -366,11 +366,7 @@ virNetTLSContextCheckCertDNACL(const char *dname,
/* This is the most common error: make it informative. */
virReportError(VIR_ERR_SYSTEM_ERROR, "%s",
- _("Client's Distinguished Name is not on the list "
- "of allowed clients (tls_allowed_dn_list). Use "
- "'virt-pki-query-dn clientcert.pem' to view the "
- "Distinguished Name field in the client certificate, "
- "or run this daemon with --verbose option."));
+ _("Client's Distinguished Name is not on the list of allowed
clients (tls_allowed_dn_list). Use 'virt-pki-query-dn clientcert.pem' to view the
Distinguished Name field in the client certificate, or run this daemon with --verbose
option."));
return 0;
}
--
2.41.0