cli: NAS actions listed before WDS ones
This commit is contained in:
parent
bf4a4272f0
commit
46bcc51c60
22
cli/qmicli.c
22
cli/qmicli.c
|
@ -277,12 +277,12 @@ allocate_client_ready (QmiDevice *device,
|
||||||
case QMI_SERVICE_DMS:
|
case QMI_SERVICE_DMS:
|
||||||
qmicli_dms_run (device, QMI_CLIENT_DMS (client), cancellable);
|
qmicli_dms_run (device, QMI_CLIENT_DMS (client), cancellable);
|
||||||
return;
|
return;
|
||||||
case QMI_SERVICE_WDS:
|
|
||||||
qmicli_wds_run (device, QMI_CLIENT_WDS (client), cancellable);
|
|
||||||
return;
|
|
||||||
case QMI_SERVICE_NAS:
|
case QMI_SERVICE_NAS:
|
||||||
qmicli_nas_run (device, QMI_CLIENT_NAS (client), cancellable);
|
qmicli_nas_run (device, QMI_CLIENT_NAS (client), cancellable);
|
||||||
return;
|
return;
|
||||||
|
case QMI_SERVICE_WDS:
|
||||||
|
qmicli_wds_run (device, QMI_CLIENT_WDS (client), cancellable);
|
||||||
|
return;
|
||||||
default:
|
default:
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
}
|
}
|
||||||
|
@ -438,18 +438,18 @@ parse_actions (void)
|
||||||
actions_enabled++;
|
actions_enabled++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* WDS options? */
|
|
||||||
if (qmicli_wds_options_enabled ()) {
|
|
||||||
service = QMI_SERVICE_WDS;
|
|
||||||
actions_enabled++;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* NAS options? */
|
/* NAS options? */
|
||||||
if (qmicli_nas_options_enabled ()) {
|
if (qmicli_nas_options_enabled ()) {
|
||||||
service = QMI_SERVICE_NAS;
|
service = QMI_SERVICE_NAS;
|
||||||
actions_enabled++;
|
actions_enabled++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* WDS options? */
|
||||||
|
if (qmicli_wds_options_enabled ()) {
|
||||||
|
service = QMI_SERVICE_WDS;
|
||||||
|
actions_enabled++;
|
||||||
|
}
|
||||||
|
|
||||||
/* Cannot mix actions from different services */
|
/* Cannot mix actions from different services */
|
||||||
if (actions_enabled > 1) {
|
if (actions_enabled > 1) {
|
||||||
g_printerr ("error: cannot execute multiple actions of different services\n");
|
g_printerr ("error: cannot execute multiple actions of different services\n");
|
||||||
|
@ -479,10 +479,10 @@ int main (int argc, char **argv)
|
||||||
context = g_option_context_new ("- Control QMI devices");
|
context = g_option_context_new ("- Control QMI devices");
|
||||||
g_option_context_add_group (context,
|
g_option_context_add_group (context,
|
||||||
qmicli_dms_get_option_group ());
|
qmicli_dms_get_option_group ());
|
||||||
g_option_context_add_group (context,
|
|
||||||
qmicli_wds_get_option_group ());
|
|
||||||
g_option_context_add_group (context,
|
g_option_context_add_group (context,
|
||||||
qmicli_nas_get_option_group ());
|
qmicli_nas_get_option_group ());
|
||||||
|
g_option_context_add_group (context,
|
||||||
|
qmicli_wds_get_option_group ());
|
||||||
g_option_context_add_main_entries (context, main_entries, NULL);
|
g_option_context_add_main_entries (context, main_entries, NULL);
|
||||||
if (!g_option_context_parse (context, &argc, &argv, &error)) {
|
if (!g_option_context_parse (context, &argc, &argv, &error)) {
|
||||||
g_printerr ("error: %s\n",
|
g_printerr ("error: %s\n",
|
||||||
|
|
Loading…
Reference in New Issue