mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-23 08:30:33 +01:00
libnm: improve error message for verify() failure for ethernet.s390-options
This commit is contained in:
parent
1794d80028
commit
9f93b0495b
1 changed files with 15 additions and 5 deletions
|
|
@ -806,14 +806,24 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||
|
||||
nm_assert(v->name);
|
||||
|
||||
if (!valid_s390_opts_check(v->name) || v->value_str[0] == '\0'
|
||||
|| strlen(v->value_str) > 200) {
|
||||
if (!valid_s390_opts_check(v->name)) {
|
||||
g_set_error(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
_("invalid '%s' or its value '%s'"),
|
||||
v->name,
|
||||
v->value_str);
|
||||
_("invalid key '%s'"),
|
||||
v->name);
|
||||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
NM_SETTING_WIRED_SETTING_NAME,
|
||||
NM_SETTING_WIRED_S390_OPTIONS);
|
||||
return FALSE;
|
||||
}
|
||||
if (v->value_str[0] == '\0' || strlen(v->value_str) > 200u) {
|
||||
g_set_error(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
_("invalid value for key '%s'"),
|
||||
v->name);
|
||||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
NM_SETTING_WIRED_SETTING_NAME,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue