diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2016-06-22 17:35:16 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2016-06-29 20:28:42 +0200 |
commit | a0bb8cd6cb3fdeaf2a1259c5127278443e0f4f1b (patch) | |
tree | 377bad7953d64eef5e9c1173da18b9074bf97ca7 /clients | |
parent | c054b871f744ff15fd15e7db180467a84535c1fd (diff) | |
download | NetworkManager-a0bb8cd6cb3fdeaf2a1259c5127278443e0f4f1b.tar.gz |
cli/connection: export read_connection_properties()
It makes sense to modify the applied connection from the device object.
Diffstat (limited to 'clients')
-rw-r--r-- | clients/cli/connections.c | 16 | ||||
-rw-r--r-- | clients/cli/connections.h | 8 |
2 files changed, 16 insertions, 8 deletions
diff --git a/clients/cli/connections.c b/clients/cli/connections.c index 12c2294d11..433d5563fe 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -4225,12 +4225,12 @@ get_value (const char **value, int *argc, char ***argv, const char *option, GErr return TRUE; } -static gboolean -read_connection_properties (NmCli *nmc, - NMConnection *connection, - int *argc, - char ***argv, - GError **error) +gboolean +nmc_read_connection_properties (NmCli *nmc, + NMConnection *connection, + int *argc, + char ***argv, + GError **error) { const char *option; const char *value = NULL; @@ -4645,7 +4645,7 @@ do_connection_add (NmCli *nmc, int argc, char **argv) read_properties: /* Get the arguments from the command line if any */ - if (argc && !read_connection_properties (nmc, connection, &argc, &argv, &error)) { + if (argc && !nmc_read_connection_properties (nmc, connection, &argc, &argv, &error)) { if (g_strcmp0 (*argv, "--") == 0 && !seen_dash_dash) { /* This is for compatibility with older nmcli that required * options and properties to be separated with "--" */ @@ -7801,7 +7801,7 @@ do_connection_modify (NmCli *nmc, next_arg (&argc, &argv); - if (!read_connection_properties (nmc, NM_CONNECTION (rc), &argc, &argv, &error)) { + if (!nmc_read_connection_properties (nmc, NM_CONNECTION (rc), &argc, &argv, &error)) { g_string_assign (nmc->return_text, error->message); nmc->return_value = error->code; g_clear_error (&error); diff --git a/clients/cli/connections.h b/clients/cli/connections.h index c158b63488..189d968a45 100644 --- a/clients/cli/connections.h +++ b/clients/cli/connections.h @@ -26,4 +26,12 @@ NMCResultCode do_connections (NmCli *nmc, int argc, char **argv); void monitor_connections (NmCli *nmc); +gboolean +nmc_read_connection_properties (NmCli *nmc, + NMConnection *connection, + int *argc, + char ***argv, + GError **error); + + #endif /* NMC_CONNECTIONS_H */ |