summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--clients/cli/agent.c2
-rw-r--r--clients/cli/settings.c7
-rw-r--r--libnm-core/nm-setting-connection.c22
3 files changed, 17 insertions, 14 deletions
diff --git a/clients/cli/agent.c b/clients/cli/agent.c
index 2b606a7fca..2379b18834 100644
--- a/clients/cli/agent.c
+++ b/clients/cli/agent.c
@@ -61,7 +61,7 @@ usage_agent_polkit (void)
"\n"
"Registers nmcli as a polkit action for the user session.\n"
"When a polkit daemon requires an authorization, nmcli asks the user and gives\n"
- "the reponse back to polkit.\n\n"));
+ "the response back to polkit.\n\n"));
}
static void
diff --git a/clients/cli/settings.c b/clients/cli/settings.c
index dcd4f1cc72..3776ace63f 100644
--- a/clients/cli/settings.c
+++ b/clients/cli/settings.c
@@ -1968,8 +1968,9 @@ validate_int64 (NMSetting *setting, const char* prop, gint64 val, GError **error
g_assert (G_IS_PARAM_SPEC (pspec));
if (g_param_value_validate (pspec, &value)) {
GParamSpecInt64 *pspec_int = (GParamSpecInt64 *) pspec;
- g_set_error (error, 1, 0, _("'%"G_GINT64_FORMAT"' is not valid; use <%"G_GINT64_FORMAT"-%"G_GINT64_FORMAT">"),
- val, pspec_int->minimum, pspec_int->maximum);
+ G_STATIC_ASSERT (sizeof (long long) >= sizeof (gint64));
+ g_set_error (error, 1, 0, _("'%lld' is not valid; use <%lld-%lld>"),
+ (long long) val, (long long) pspec_int->minimum, (long long) pspec_int->maximum);
success = FALSE;
}
g_value_unset (&value);
@@ -1990,7 +1991,7 @@ validate_uint (NMSetting *setting, const char* prop, guint val, GError **error)
g_assert (G_IS_PARAM_SPEC (pspec));
if (g_param_value_validate (pspec, &value)) {
GParamSpecUInt *pspec_uint = (GParamSpecUInt *) pspec;
- g_set_error (error, 1, 0, _("'%u' is not valid; use <%d-%d>"),
+ g_set_error (error, 1, 0, _("'%u' is not valid; use <%u-%u>"),
val, pspec_uint->minimum, pspec_uint->maximum);
success = FALSE;
}
diff --git a/libnm-core/nm-setting-connection.c b/libnm-core/nm-setting-connection.c
index 0624c61f2f..23a0ac41a8 100644
--- a/libnm-core/nm-setting-connection.c
+++ b/libnm-core/nm-setting-connection.c
@@ -874,10 +874,10 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
if (is_slave) {
if (!priv->master) {
- g_set_error_literal (error,
- NM_CONNECTION_ERROR,
- NM_CONNECTION_ERROR_MISSING_PROPERTY,
- _("Slave connections need a valid '" NM_SETTING_CONNECTION_MASTER "' property"));
+ g_set_error (error,
+ NM_CONNECTION_ERROR,
+ NM_CONNECTION_ERROR_MISSING_PROPERTY,
+ _("Slave connections need a valid '%s' property"), NM_SETTING_CONNECTION_MASTER);
g_prefix_error (error, "%s.%s: ", NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_MASTER);
return FALSE;
}
@@ -895,10 +895,11 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
normerr_missing_slave_type = slave_type;
normerr_missing_slave_type_port = nm_setting_get_name (s_port);
} else {
- g_set_error_literal (error,
- NM_CONNECTION_ERROR,
- NM_CONNECTION_ERROR_MISSING_PROPERTY,
- _("Cannot set '" NM_SETTING_CONNECTION_MASTER "' without '" NM_SETTING_CONNECTION_SLAVE_TYPE "'"));
+ g_set_error (error,
+ NM_CONNECTION_ERROR,
+ NM_CONNECTION_ERROR_MISSING_PROPERTY,
+ _("Cannot set '%s' without '%s'"),
+ NM_SETTING_CONNECTION_MASTER, NM_SETTING_CONNECTION_SLAVE_TYPE);
g_prefix_error (error, "%s.%s: ", NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_SLAVE_TYPE);
return FALSE;
}
@@ -936,8 +937,9 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
g_set_error (error,
NM_CONNECTION_ERROR,
NM_CONNECTION_ERROR_MISSING_PROPERTY,
- _("Detect a slave connection with '" NM_SETTING_CONNECTION_MASTER "' set and a port type '%s'. '" NM_SETTING_CONNECTION_SLAVE_TYPE "' should be set to '%s'"),
- normerr_missing_slave_type_port, normerr_missing_slave_type);
+ _("Detect a slave connection with '%s' set and a port type '%s'. '%s' should be set to '%s'"),
+ NM_SETTING_CONNECTION_MASTER, normerr_missing_slave_type_port,
+ NM_SETTING_CONNECTION_SLAVE_TYPE, normerr_missing_slave_type);
g_prefix_error (error, "%s.%s: ", NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_SLAVE_TYPE);
return NM_SETTING_VERIFY_NORMALIZABLE_ERROR;
}