diff options
author | Thomas Haller <thaller@redhat.com> | 2019-04-03 15:44:19 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-04-10 15:05:57 +0200 |
commit | 84f2037648a68693faa7fa1768743921439113c9 (patch) | |
tree | bc5f759549fda6579bd3c376f7a550465c01b9ea /clients/cli | |
parent | 700a32e5ddd95cd2e11ee1faaaa97177d39fd27a (diff) | |
download | NetworkManager-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.
Diffstat (limited to 'clients/cli')
-rw-r--r-- | clients/cli/connections.c | 4 | ||||
-rw-r--r-- | clients/cli/settings.c | 2 | ||||
-rw-r--r-- | clients/cli/utils.c | 3 |
3 files changed, 5 insertions, 4 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 |