aboutsummaryrefslogtreecommitdiff
path: root/cli/mmcli-bearer.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2011-12-21 13:05:25 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-03-15 14:14:36 +0100
commit16f2b7bdb8ffdb84e7bd142bde91c7670c63a3e7 (patch)
tree4b550a6713e540db2baa01b5f3e67a70a7c1a994 /cli/mmcli-bearer.c
parent265a516f42a0ff8d2b421aa199e54d779f0c153f (diff)
cli: specify common options in a new group
Actions on modems from specific interfaces, like 3GPP, will also need the modem to be specified. The new 'Common' option group will handle all options to specify objects.
Diffstat (limited to 'cli/mmcli-bearer.c')
-rw-r--r--cli/mmcli-bearer.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/cli/mmcli-bearer.c b/cli/mmcli-bearer.c
index b3bb85e1..5fe50fab 100644
--- a/cli/mmcli-bearer.c
+++ b/cli/mmcli-bearer.c
@@ -43,17 +43,12 @@ typedef struct {
static Context *ctx;
/* Options */
-static gchar *bearer_str;
static gboolean info_flag; /* set when no action found */
static gchar *connect_with_number_str;
static gboolean connect_flag;
static gboolean disconnect_flag;
static GOptionEntry entries[] = {
- { "bearer", 'b', 0, G_OPTION_ARG_STRING, &bearer_str,
- "Specify bearer by path. Shows bearer information if no action specified.",
- NULL
- },
{ "connect", 'c', 0, G_OPTION_ARG_NONE, &connect_flag,
"Connect a given bearer using the default number, if any.",
NULL
@@ -94,7 +89,7 @@ mmcli_bearer_options_enabled (void)
connect_flag +
disconnect_flag);
- if (n_actions == 0 && bearer_str) {
+ if (n_actions == 0 && mmcli_get_common_bearer_string ()) {
/* default to info */
info_flag = TRUE;
n_actions++;
@@ -330,7 +325,7 @@ mmcli_bearer_run_asynchronous (GDBusConnection *connection,
/* Get proper bearer */
mmcli_get_bearer (connection,
- bearer_str,
+ mmcli_get_common_bearer_string (),
cancellable,
(GAsyncReadyCallback)get_bearer_ready,
NULL);
@@ -344,7 +339,7 @@ mmcli_bearer_run_synchronous (GDBusConnection *connection)
/* Initialize context */
ctx = g_new0 (Context, 1);
ctx->bearer = mmcli_get_bearer_sync (connection,
- bearer_str,
+ mmcli_get_common_bearer_string (),
&ctx->manager,
&ctx->object);