summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-04-03 15:44:19 +0200
committerThomas Haller <thaller@redhat.com>2019-04-10 15:05:57 +0200
commit84f2037648a68693faa7fa1768743921439113c9 (patch)
treebc5f759549fda6579bd3c376f7a550465c01b9ea
parent700a32e5ddd95cd2e11ee1faaaa97177d39fd27a (diff)
downloadNetworkManager-84f2037648a68693faa7fa1768743921439113c9.tar.gz
shared: add flags argument to nm_utils_strsplit_set()
It will be useful to extend nm_utils_strsplit_set() with various flavors and subtly different behaviors. Add a flags argument to support these.
-rw-r--r--clients/cli/connections.c4
-rw-r--r--clients/cli/settings.c2
-rw-r--r--clients/cli/utils.c3
-rw-r--r--clients/common/nm-meta-setting-desc.c24
-rw-r--r--libnm-core/nm-setting-bridge.c2
-rw-r--r--libnm-core/nm-utils.c2
-rw-r--r--libnm-core/tests/test-general.c10
-rw-r--r--shared/nm-utils/nm-shared-utils.c23
-rw-r--r--shared/nm-utils/nm-shared-utils.h16
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c54
10 files changed, 83 insertions, 57 deletions
diff --git a/clients/cli/connections.c b/clients/cli/connections.c
index 9a71d3944d..97c46923ae 100644
--- a/clients/cli/connections.c
+++ b/clients/cli/connections.c
@@ -1876,7 +1876,7 @@ parse_preferred_connection_order (const char *order, GError **error)
gboolean inverse, unique;
int i;
- strv = nm_utils_strsplit_set (order, ":", FALSE);
+ strv = nm_utils_strsplit_set (order, ":");
if (!strv) {
g_set_error (error, NMCLI_ERROR, 0,
_("incorrect string '%s' of '--order' option"), order);
@@ -2680,7 +2680,7 @@ parse_passwords (const char *passwd_file, GError **error)
return NULL;
}
- strv = nm_utils_strsplit_set (contents, "\r\n", FALSE);
+ strv = nm_utils_strsplit_set (contents, "\r\n");
for (iter = strv; *iter; iter++) {
gs_free char *iter_s = g_strdup (*iter);
diff --git a/clients/cli/settings.c b/clients/cli/settings.c
index d050e24e28..70348dbfec 100644
--- a/clients/cli/settings.c
+++ b/clients/cli/settings.c
@@ -338,7 +338,7 @@ _set_fcn_precheck_connection_secondaries (NMClient *client,
char **iter;
gboolean modified = FALSE;
- strv0 = nm_utils_strsplit_set (value, " \t,", FALSE);
+ strv0 = nm_utils_strsplit_set (value, " \t,");
if (!strv0)
return TRUE;
diff --git a/clients/cli/utils.c b/clients/cli/utils.c
index 0e74ba8867..a8b81279ed 100644
--- a/clients/cli/utils.c
+++ b/clients/cli/utils.c
@@ -508,7 +508,8 @@ nmc_string_to_arg_array (const char *line, const char *delim, gboolean unquote,
gs_free const char **arr0 = NULL;
char **arr;
- arr0 = nm_utils_strsplit_set (line ?: "", delim ?: " \t", FALSE);
+ arr0 = nm_utils_strsplit_set (line ?: "",
+ delim ?: " \t");
if (!arr0)
arr = g_new0 (char *, 1);
else
diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c
index d47e1bd67e..25337cc3a3 100644
--- a/clients/common/nm-meta-setting-desc.c
+++ b/clients/common/nm-meta-setting-desc.c
@@ -197,19 +197,19 @@ _value_strsplit (const char *value,
/* note that all modes remove empty tokens (",", "a,,b", ",,"). */
switch (split_mode) {
case VALUE_STRSPLIT_MODE_STRIPPED:
- strv = nm_utils_strsplit_set (value, NM_ASCII_SPACES",", FALSE);
+ strv = nm_utils_strsplit_set (value, NM_ASCII_SPACES",");
break;
case VALUE_STRSPLIT_MODE_OBJLIST:
- strv = nm_utils_strsplit_set (value, ",", FALSE);
+ strv = nm_utils_strsplit_set (value, ",");
break;
case VALUE_STRSPLIT_MODE_OBJLIST_WITH_ESCAPE:
- strv = nm_utils_strsplit_set (value, ",", TRUE);
+ strv = nm_utils_strsplit_set_full (value, ",", NM_UTILS_STRSPLIT_SET_FLAGS_ALLOW_ESCAPING);
break;
case VALUE_STRSPLIT_MODE_MULTILIST:
- strv = nm_utils_strsplit_set (value, " \t,", FALSE);
+ strv = nm_utils_strsplit_set (value, " \t,");
break;
case VALUE_STRSPLIT_MODE_MULTILIST_WITH_ESCAPE:
- strv = nm_utils_strsplit_set (value, MULTILIST_WITH_ESCAPE_CHARS, TRUE);
+ strv = nm_utils_strsplit_set_full (value, MULTILIST_WITH_ESCAPE_CHARS, NM_UTILS_STRSPLIT_SET_FLAGS_ALLOW_ESCAPING);
break;
default:
nm_assert_not_reached ();
@@ -306,7 +306,7 @@ _parse_ip_route (int family,
nm_assert (!error || !*error);
str_clean = nm_strstrip_avoid_copy_a (300, str, &str_clean_free);
- routev = nm_utils_strsplit_set (str_clean, " \t", FALSE);
+ routev = nm_utils_strsplit_set (str_clean, " \t");
if (!routev) {
g_set_error (error, 1, 0,
"'%s' is not valid. %s",
@@ -480,7 +480,7 @@ _parse_team_link_watcher (const char *str,
nm_assert (!error || !*error);
str_clean = nm_strstrip_avoid_copy_a (300, str, &str_clean_free);
- watcherv = nm_utils_strsplit_set (str_clean, " \t", FALSE);
+ watcherv = nm_utils_strsplit_set (str_clean, " \t");
if (!watcherv) {
g_set_error (error, 1, 0, "'%s' is not valid", str);
return NULL;
@@ -489,7 +489,7 @@ _parse_team_link_watcher (const char *str,
for (i = 0; watcherv[i]; i++) {
gs_free const char **pair = NULL;
- pair = nm_utils_strsplit_set (watcherv[i], "=", FALSE);
+ pair = nm_utils_strsplit_set (watcherv[i], "=");
if (!pair) {
g_set_error (error, 1, 0, "'%s' is not valid: %s", watcherv[i],
"properties should be specified as 'key=value'");
@@ -1935,7 +1935,7 @@ _set_fcn_optionlist (ARGS_SET_FCN)
return _gobject_property_reset_default (setting, property_info->property_name);
nstrv = 0;
- strv = nm_utils_strsplit_set (value, ",", FALSE);
+ strv = nm_utils_strsplit_set (value, ",");
if (strv) {
strv_val = g_new (const char *, NM_PTRARRAY_LEN (strv));
for (i = 0; strv[i]; i++) {
@@ -2187,7 +2187,7 @@ _set_fcn_gobject_bytes (ARGS_SET_FCN)
}
/* Otherwise, consider the following format: AA b 0xCc D */
- strv = nm_utils_strsplit_set (value, " \t", FALSE);
+ strv = nm_utils_strsplit_set (value, " \t");
array = g_byte_array_sized_new (NM_PTRARRAY_LEN (strv));
for (iter = strv; iter && *iter; iter++) {
int v;
@@ -2797,7 +2797,7 @@ _set_fcn_dcb_flags (ARGS_SET_FCN)
const char *const*iter;
/* Check for individual flag numbers */
- strv = nm_utils_strsplit_set (value, " \t,", FALSE);
+ strv = nm_utils_strsplit_set (value, " \t,");
for (iter = strv; iter && *iter; iter++) {
t = _nm_utils_ascii_str_to_int64 (*iter, 0, 0, DCB_ALL_FLAGS, -1);
@@ -3948,7 +3948,7 @@ _set_fcn_wired_s390_subchannels (ARGS_SET_FCN)
if (_SET_FCN_DO_RESET_DEFAULT (property_info, modifier, value))
return _gobject_property_reset_default (setting, property_info->property_name);
- strv = nm_utils_strsplit_set (value, " ,\t", FALSE);
+ strv = nm_utils_strsplit_set (value, " ,\t");
len = NM_PTRARRAY_LEN (strv);
if (len != 2 && len != 3) {
g_set_error (error, 1, 0, _("'%s' is not valid; 2 or 3 strings should be provided"),
diff --git a/libnm-core/nm-setting-bridge.c b/libnm-core/nm-setting-bridge.c
index f87abd0654..590f6ea2bd 100644
--- a/libnm-core/nm-setting-bridge.c
+++ b/libnm-core/nm-setting-bridge.c
@@ -432,7 +432,7 @@ nm_bridge_vlan_from_str (const char *str, GError **error)
g_return_val_if_fail (str, NULL);
g_return_val_if_fail (!error || !*error, NULL);
- tokens = nm_utils_strsplit_set (str, " ", FALSE);
+ tokens = nm_utils_strsplit_set (str, " ");
if (!tokens || !tokens[0]) {
g_set_error_literal (error,
NM_CONNECTION_ERROR,
diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c
index cf7ddb08f9..0d9118adee 100644
--- a/libnm-core/nm-utils.c
+++ b/libnm-core/nm-utils.c
@@ -2849,7 +2849,7 @@ _nm_sriov_vf_parse_vlans (NMSriovVF *vf, const char *str, GError **error)
gs_free const char **vlans = NULL;
guint i;
- vlans = nm_utils_strsplit_set (str, ";", FALSE);
+ vlans = nm_utils_strsplit_set (str, ";");
if (!vlans) {
g_set_error_literal (error,
NM_CONNECTION_ERROR,
diff --git a/libnm-core/tests/test-general.c b/libnm-core/tests/test-general.c
index 765957135a..4063dfcf20 100644
--- a/libnm-core/tests/test-general.c
+++ b/libnm-core/tests/test-general.c
@@ -276,7 +276,15 @@ _do_test_nm_utils_strsplit_set (gboolean escape, const char *str, ...)
args = (const char *const*) args_array->pdata;
- words = nm_utils_strsplit_set (str, " \t\n", escape);
+ if (!escape && nmtst_get_rand_bool ())
+ words = nm_utils_strsplit_set (str, " \t\n");
+ else {
+ words = nm_utils_strsplit_set_full (str,
+ " \t\n",
+ escape
+ ? NM_UTILS_STRSPLIT_SET_FLAGS_ALLOW_ESCAPING
+ : NM_UTILS_STRSPLIT_SET_FLAGS_NONE);
+ }
if (!args[0]) {
g_assert (!words);
diff --git a/shared/nm-utils/nm-shared-utils.c b/shared/nm-utils/nm-shared-utils.c
index 5f317e4144..13a1a35f6e 100644
--- a/shared/nm-utils/nm-shared-utils.c
+++ b/shared/nm-utils/nm-shared-utils.c
@@ -972,11 +972,11 @@ _char_lookup_table_init (guint8 lookup[static 256],
}
/**
- * nm_utils_strsplit_set:
+ * nm_utils_strsplit_set_full:
* @str: the string to split.
* @delimiters: the set of delimiters. If %NULL, defaults to " \t\n",
* like bash's $IFS.
- * @allow_escaping: whether delimiters can be escaped by a backslash
+ * @flags: additional flags for controlling the operation.
*
* This is a replacement for g_strsplit_set() which avoids copying
* each word once (the entire strv array), but instead copies it once
@@ -985,8 +985,8 @@ _char_lookup_table_init (guint8 lookup[static 256],
* Another difference from g_strsplit_set() is that this never returns
* empty words. Multiple delimiters are combined and treated as one.
*
- * If @allow_escaping is %TRUE, delimiters prefixed by a backslash are
- * not treated as a separator. Such delimiters and their escape
+ * If @flags has %NM_UTILS_STRSPLIT_SET_FLAGS_ALLOW_ESCAPING, delimiters prefixed
+ * by a backslash are not treated as a separator. Such delimiters and their escape
* character are copied to the current word without unescaping them.
*
* Returns: %NULL if @str is %NULL or contains only delimiters.
@@ -1000,7 +1000,9 @@ _char_lookup_table_init (guint8 lookup[static 256],
* like "g_strstrip((char *) iter[0])".
*/
const char **
-nm_utils_strsplit_set (const char *str, const char *delimiters, gboolean allow_escaping)
+nm_utils_strsplit_set_full (const char *str,
+ const char *delimiters,
+ NMUtilsStrsplitSetFlags flags)
{
const char **ptr, **ptr0;
gsize alloc_size, plen, i;
@@ -1009,6 +1011,7 @@ nm_utils_strsplit_set (const char *str, const char *delimiters, gboolean allow_e
char *s;
guint8 delimiters_table[256];
gboolean escaped = FALSE;
+ const gboolean f_allow_escaping = NM_FLAGS_HAS (flags, NM_UTILS_STRSPLIT_SET_FLAGS_ALLOW_ESCAPING);
if (!str)
return NULL;
@@ -1033,7 +1036,7 @@ nm_utils_strsplit_set (const char *str, const char *delimiters, gboolean allow_e
/* skip initial delimiters, and return of the remaining string is
* empty. */
- while (_is_delimiter (str[0], delimiters_table, allow_escaping, escaped))
+ while (_is_delimiter (str[0], delimiters_table, f_allow_escaping, escaped))
next_char (str, escaped);
if (!str[0])
@@ -1067,11 +1070,11 @@ nm_utils_strsplit_set (const char *str, const char *delimiters, gboolean allow_e
ptr[plen++] = s;
- nm_assert (s[0] && !_is_delimiter (s[0], delimiters_table, allow_escaping, escaped));
+ nm_assert (s[0] && !_is_delimiter (s[0], delimiters_table, f_allow_escaping, escaped));
while (TRUE) {
next_char (s, escaped);
- if (_is_delimiter (s[0], delimiters_table, allow_escaping, escaped))
+ if (_is_delimiter (s[0], delimiters_table, f_allow_escaping, escaped))
break;
if (s[0] == '\0')
goto done;
@@ -1079,7 +1082,7 @@ nm_utils_strsplit_set (const char *str, const char *delimiters, gboolean allow_e
s[0] = '\0';
next_char (s, escaped);
- while (_is_delimiter (s[0], delimiters_table, allow_escaping, escaped))
+ while (_is_delimiter (s[0], delimiters_table, f_allow_escaping, escaped))
next_char (s, escaped);
if (s[0] == '\0')
break;
@@ -2272,7 +2275,7 @@ nm_utils_get_start_time_for_pid (pid_t pid, char *out_state, pid_t *out_ppid)
state = p[0];
- tokens = nm_utils_strsplit_set (p, " ", FALSE);
+ tokens = nm_utils_strsplit_set (p, " ");
if (NM_PTRARRAY_LEN (tokens) < 20)
goto fail;
diff --git a/shared/nm-utils/nm-shared-utils.h b/shared/nm-utils/nm-shared-utils.h
index 95ed5c946f..75ef429dd7 100644
--- a/shared/nm-utils/nm-shared-utils.h
+++ b/shared/nm-utils/nm-shared-utils.h
@@ -332,7 +332,21 @@ int nm_utils_dbus_path_cmp (const char *dbus_path_a, const char *dbus_path_b);
/*****************************************************************************/
-const char **nm_utils_strsplit_set (const char *str, const char *delimiters, gboolean allow_escaping);
+typedef enum {
+ NM_UTILS_STRSPLIT_SET_FLAGS_NONE = 0,
+ NM_UTILS_STRSPLIT_SET_FLAGS_ALLOW_ESCAPING = (1u << 0),
+} NMUtilsStrsplitSetFlags;
+
+const char **nm_utils_strsplit_set_full (const char *str,
+ const char *delimiter,
+ NMUtilsStrsplitSetFlags flags);
+
+static inline const char **
+nm_utils_strsplit_set (const char *str,
+ const char *delimiters)
+{
+ return nm_utils_strsplit_set_full (str, delimiters, NM_UTILS_STRSPLIT_SET_FLAGS_NONE);
+}
char *nm_utils_str_simpletokens_extract_next (char **p_line_start);
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
index f9722b8f37..8d39f827ca 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
@@ -457,7 +457,7 @@ make_connection_setting (const char *file,
if (v) {
gs_free const char **items = NULL;
- items = nm_utils_strsplit_set (v, " ", FALSE);
+ items = nm_utils_strsplit_set (v, " ");
for (iter = items; iter && *iter; iter++) {
if (!nm_setting_connection_add_permission (s_con, "user", *iter, NULL))
PARSE_WARNING ("invalid USERS item '%s'", *iter);
@@ -473,7 +473,7 @@ make_connection_setting (const char *file,
if (v) {
gs_free const char **items = NULL;
- items = nm_utils_strsplit_set (v, " \t", FALSE);
+ items = nm_utils_strsplit_set (v, " \t");
for (iter = items; iter && *iter; iter++) {
if (!nm_setting_connection_add_secondary (s_con, *iter))
PARSE_WARNING ("secondary connection UUID '%s' already added", *iter);
@@ -889,7 +889,7 @@ parse_route_line (const char *line,
* Maybe later we want to support some form of quotation here.
* Which of course, would be incompatible with initscripts.
*/
- words_free = nm_utils_strsplit_set (line, " \t\n", FALSE);
+ words_free = nm_utils_strsplit_set (line, " \t\n");
words = words_free ?: NM_PTRARRAY_EMPTY (const char *);
@@ -1327,7 +1327,7 @@ parse_dns_options (NMSettingIPConfig *ip_config, const char *value)
if (!nm_setting_ip_config_has_dns_options (ip_config))
nm_setting_ip_config_clear_dns_options (ip_config, TRUE);
- options = nm_utils_strsplit_set (value, " ", FALSE);
+ options = nm_utils_strsplit_set (value, " ");
if (options) {
for (item = options; *item; item++) {
if (!nm_setting_ip_config_add_dns_option (ip_config, *item))
@@ -1443,7 +1443,7 @@ make_match_setting (shvarFile *ifcfg)
if (!v)
return NULL;
- strv = nm_utils_strsplit_set (v, " \t", TRUE);
+ strv = nm_utils_strsplit_set_full (v, " \t", NM_UTILS_STRSPLIT_SET_FLAGS_ALLOW_ESCAPING);
if (strv) {
for (i = 0; strv[i]; i++) {
if (!s_match)
@@ -1722,7 +1722,7 @@ make_ip4_setting (shvarFile *ifcfg,
if (v) {
gs_free const char **searches = NULL;
- searches = nm_utils_strsplit_set (v, " ", FALSE);
+ searches = nm_utils_strsplit_set (v, " ");
if (searches) {
for (item = searches; *item; item++) {
if (!nm_setting_ip_config_add_dns_search (s_ip4, *item))
@@ -1783,7 +1783,7 @@ make_ip4_setting (shvarFile *ifcfg,
if (v) {
gs_free const char **searches = NULL;
- searches = nm_utils_strsplit_set (v, " ", FALSE);
+ searches = nm_utils_strsplit_set (v, " ");
if (searches) {
for (item = searches; *item; item++) {
if (!nm_setting_ip_config_add_dns_search (s_ip4, *item))
@@ -2099,7 +2099,7 @@ make_ip6_setting (shvarFile *ifcfg,
ipv6addr_secondaries ?: "",
NULL);
- list = nm_utils_strsplit_set (value, " ", FALSE);
+ list = nm_utils_strsplit_set (value, " ");
for (iter = list, i = 0; iter && *iter; iter++, i++) {
NMIPAddress *addr = NULL;
@@ -2192,7 +2192,7 @@ make_ip6_setting (shvarFile *ifcfg,
if (v) {
gs_free const char **searches = NULL;
- searches = nm_utils_strsplit_set (v, " ", FALSE);
+ searches = nm_utils_strsplit_set (v, " ");
if (searches) {
for (iter = searches; *iter; iter++) {
if (!nm_setting_ip_config_add_dns_search (s_ip6, *iter))
@@ -2551,7 +2551,7 @@ read_dcb_percent_array (shvarFile *ifcfg,
return TRUE;
}
- split = nm_utils_strsplit_set (val, ",", FALSE);
+ split = nm_utils_strsplit_set (val, ",");
if (NM_PTRARRAY_LEN (split) != 8) {
PARSE_WARNING ("invalid %s percentage list value '%s'", prop, val);
g_set_error_literal (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION,
@@ -2963,7 +2963,7 @@ fill_wpa_ciphers (shvarFile *ifcfg,
if (!p)
return TRUE;
- list = nm_utils_strsplit_set (p, " ", FALSE);
+ list = nm_utils_strsplit_set (p, " ");
for (iter = list; iter && *iter; iter++, i++) {
/* Ad-Hoc configurations cannot have pairwise ciphers, and can only
* have one group cipher. Ignore any additional group ciphers and
@@ -3233,7 +3233,7 @@ eap_peap_reader (const char *eap_method,
}
/* Handle options for the inner auth method */
- list = nm_utils_strsplit_set (v, " ", FALSE);
+ list = nm_utils_strsplit_set (v, " ");
iter = list;
if (iter) {
if (NM_IN_STRSET (*iter, "MSCHAPV2",
@@ -3311,7 +3311,7 @@ eap_ttls_reader (const char *eap_method,
inner_auth = g_ascii_strdown (v, -1);
/* Handle options for the inner auth method */
- list = nm_utils_strsplit_set (inner_auth, " ", FALSE);
+ list = nm_utils_strsplit_set (inner_auth, " ");
iter = list;
if (iter) {
if (NM_IN_STRSET (*iter, "mschapv2",
@@ -3372,7 +3372,7 @@ eap_fast_reader (const char *eap_method,
if (fast_provisioning) {
gs_free const char **list1 = NULL;
- list1 = nm_utils_strsplit_set (fast_provisioning, " \t", FALSE);
+ list1 = nm_utils_strsplit_set (fast_provisioning, " \t");
for (iter = list1; iter && *iter; iter++) {
if (strcmp (*iter, "allow-unauth") == 0)
allow_unauth = TRUE;
@@ -3406,7 +3406,7 @@ eap_fast_reader (const char *eap_method,
}
/* Handle options for the inner auth method */
- list = nm_utils_strsplit_set (inner_auth, " ", FALSE);
+ list = nm_utils_strsplit_set (inner_auth, " ");
iter = list;
if (iter) {
if ( !strcmp (*iter, "MSCHAPV2")
@@ -3486,7 +3486,7 @@ read_8021x_list_value (shvarFile *ifcfg,
if (!v)
return;
- strv = nm_utils_strsplit_set (v, " \t", FALSE);
+ strv = nm_utils_strsplit_set (v, " \t");
if (strv)
g_object_set (setting, prop_name, strv, NULL);
}
@@ -3515,7 +3515,7 @@ fill_8021x (shvarFile *ifcfg,
return NULL;
}
- list = nm_utils_strsplit_set (v, " ", FALSE);
+ list = nm_utils_strsplit_set (v, " ");
s_8021x = (NMSetting8021x *) nm_setting_802_1x_new ();
@@ -3829,7 +3829,7 @@ transform_hwaddr_blacklist (const char *blacklist)
const char **strv;
gsize i, j;
- strv = nm_utils_strsplit_set (blacklist, " \t", FALSE);
+ strv = nm_utils_strsplit_set (blacklist, " \t");
if (!strv)
return NULL;
for (i = 0, j = 0; strv[j]; j++) {
@@ -4147,7 +4147,7 @@ parse_ethtool_option (const char *value,
gs_free const char **words = NULL;
guint i;
- words = nm_utils_strsplit_set (value, NULL, FALSE);
+ words = nm_utils_strsplit_set (value, NULL);
if (!words)
return;
@@ -4418,7 +4418,7 @@ parse_ethtool_options (shvarFile *ifcfg, NMConnection *connection)
gs_free const char **opts = NULL;
const char *const *iter;
- opts = nm_utils_strsplit_set (ethtool_opts, ";", FALSE);
+ opts = nm_utils_strsplit_set (ethtool_opts, ";");
for (iter = opts; iter && iter[0]; iter++) {
/* in case of repeated wol_passwords, parse_ethtool_option()
* will do the right thing and clear wol_password before resetting. */
@@ -4514,7 +4514,7 @@ make_wired_setting (shvarFile *ifcfg,
gs_free const char **chans = NULL;
guint32 num_chans;
- chans = nm_utils_strsplit_set (value, ",", FALSE);
+ chans = nm_utils_strsplit_set (value, ",");
num_chans = NM_PTRARRAY_LEN (chans);
if (num_chans < 2 || num_chans > 3) {
PARSE_WARNING ("invalid SUBCHANNELS '%s' (%u channels, 2 or 3 expected)",
@@ -4837,7 +4837,7 @@ make_bond_setting (shvarFile *ifcfg,
gs_free const char **items = NULL;
const char *const *iter;
- items = nm_utils_strsplit_set (v, " ", FALSE);
+ items = nm_utils_strsplit_set (v, " ");
for (iter = items; iter && *iter; iter++) {
gs_strfreev char **keys = NULL;
const char *key, *val;
@@ -5117,7 +5117,7 @@ handle_bridging_opts (NMSetting *setting,
gs_free const char **items = NULL;
const char *const *iter;
- items = nm_utils_strsplit_set (value, " ", FALSE);
+ items = nm_utils_strsplit_set (value, " ");
for (iter = items; iter && *iter; iter++) {
gs_strfreev char **keys = NULL;
const char *key, *val;
@@ -5151,7 +5151,7 @@ read_bridge_vlans (shvarFile *ifcfg,
array = g_ptr_array_new_with_free_func ((GDestroyNotify) nm_bridge_vlan_unref);
- strv = nm_utils_strsplit_set (value, ",", FALSE);
+ strv = nm_utils_strsplit_set (value, ",");
if (strv) {
for (iter = strv; *iter; iter++) {
vlan = nm_bridge_vlan_from_str (*iter, &local);
@@ -5382,7 +5382,7 @@ parse_prio_map_list (NMSettingVlan *s_vlan,
v = svGetValueStr (ifcfg, key, &value);
if (!v)
return;
- list = nm_utils_strsplit_set (v, ",", FALSE);
+ list = nm_utils_strsplit_set (v, ",");
for (iter = list; iter && *iter; iter++) {
if (!strchr (*iter, ':'))
@@ -5487,7 +5487,7 @@ make_vlan_setting (shvarFile *ifcfg,
gs_free const char **strv = NULL;
const char *const *ptr;
- strv = nm_utils_strsplit_set (v, ", ", FALSE);
+ strv = nm_utils_strsplit_set (v, ", ");
for (ptr = strv; ptr && *ptr; ptr++) {
if (nm_streq (*ptr, "GVRP") && gvrp == -1)
vlan_flags |= NM_VLAN_FLAG_GVRP;
@@ -5629,7 +5629,7 @@ check_dns_search_domains (shvarFile *ifcfg, NMSetting *s_ip4, NMSetting *s_ip6)
gs_free const char **searches = NULL;
const char *const *item;
- searches = nm_utils_strsplit_set (v, " ", FALSE);
+ searches = nm_utils_strsplit_set (v, " ");
if (searches) {
for (item = searches; *item; item++) {
if (!nm_setting_ip_config_add_dns_search (NM_SETTING_IP_CONFIG (s_ip6), *item))