mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 19:50:14 +01:00
cli: don't fail removing non-existing option (pt5)
Part 5, which addresses the issue for DEFINE_REMOVER_OPTION(), which are simple properties.
This commit is contained in:
parent
6baaa20763
commit
eff01cd256
1 changed files with 3 additions and 8 deletions
|
|
@ -1715,14 +1715,9 @@ vpn_data_item (const char *key, const char *value, gpointer user_data)
|
|||
static gboolean \
|
||||
def_func (ARGS_REMOVE_FCN) \
|
||||
{ \
|
||||
gboolean success = FALSE; \
|
||||
if (value && *value) { \
|
||||
success = rem_func (s_macro (setting), value); \
|
||||
if (!success) \
|
||||
g_set_error (error, 1, 0, _("invalid option '%s'"), value); \
|
||||
} else \
|
||||
g_set_error_literal (error, 1, 0, _("missing option")); \
|
||||
return success; \
|
||||
if (value && *value) \
|
||||
rem_func (s_macro (setting), value); \
|
||||
return TRUE; \
|
||||
}
|
||||
|
||||
#define DEFINE_ALLOWED_VAL_FUNC(def_func, valid_values) \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue