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:
|
||||
qmicli_dms_run (device, QMI_CLIENT_DMS (client), cancellable);
|
||||
return;
|
||||
case QMI_SERVICE_WDS:
|
||||
qmicli_wds_run (device, QMI_CLIENT_WDS (client), cancellable);
|
||||
return;
|
||||
case QMI_SERVICE_NAS:
|
||||
qmicli_nas_run (device, QMI_CLIENT_NAS (client), cancellable);
|
||||
return;
|
||||
case QMI_SERVICE_WDS:
|
||||
qmicli_wds_run (device, QMI_CLIENT_WDS (client), cancellable);
|
||||
return;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
@ -438,18 +438,18 @@ parse_actions (void)
|
|||
actions_enabled++;
|
||||
}
|
||||
|
||||
/* WDS options? */
|
||||
if (qmicli_wds_options_enabled ()) {
|
||||
service = QMI_SERVICE_WDS;
|
||||
actions_enabled++;
|
||||
}
|
||||
|
||||
/* NAS options? */
|
||||
if (qmicli_nas_options_enabled ()) {
|
||||
service = QMI_SERVICE_NAS;
|
||||
actions_enabled++;
|
||||
}
|
||||
|
||||
/* WDS options? */
|
||||
if (qmicli_wds_options_enabled ()) {
|
||||
service = QMI_SERVICE_WDS;
|
||||
actions_enabled++;
|
||||
}
|
||||
|
||||
/* Cannot mix actions from different services */
|
||||
if (actions_enabled > 1) {
|
||||
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");
|
||||
g_option_context_add_group (context,
|
||||
qmicli_dms_get_option_group ());
|
||||
g_option_context_add_group (context,
|
||||
qmicli_wds_get_option_group ());
|
||||
g_option_context_add_group (context,
|
||||
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);
|
||||
if (!g_option_context_parse (context, &argc, &argv, &error)) {
|
||||
g_printerr ("error: %s\n",
|
||||
|
|
Loading…
Reference in New Issue