diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2013-02-22 08:58:36 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2013-02-22 16:35:56 +0100 |
commit | 75d20c15d4f844270cfc6c31fae261412e4b1b59 (patch) | |
tree | 1a99f7713ae4d5cd1303d94da8744cdfc5b71fa9 /cli/mmcli-modem.c | |
parent | a18140e8ed86e6881d1b5f4bcf33620ff791f35e (diff) |
api: notify in the interface about the reason why the modem is FAILED
We currently implement 'SIM missing' and 'SIM error', which are probably the
most common ones.
Diffstat (limited to 'cli/mmcli-modem.c')
-rw-r--r-- | cli/mmcli-modem.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/cli/mmcli-modem.c b/cli/mmcli-modem.c index fac1798b..7027f53e 100644 --- a/cli/mmcli-modem.c +++ b/cli/mmcli-modem.c @@ -351,13 +351,18 @@ print_modem_info (void) g_print (" -------------------------\n" " Status | lock: '%s'\n" " | unlock retries: '%s'\n" - " | state: '%s'\n" - " | power state: '%s'\n" - " | access tech: '%s'\n" - " | signal quality: '%u' (%s)\n", + " | state: '%s'\n", mm_modem_lock_get_string (mm_modem_get_unlock_required (ctx->modem)), VALIDATE_UNKNOWN (unlock_retries_string), - VALIDATE_UNKNOWN (mm_modem_state_get_string (mm_modem_get_state (ctx->modem))), + VALIDATE_UNKNOWN (mm_modem_state_get_string (mm_modem_get_state (ctx->modem)))); + + if (mm_modem_get_state (ctx->modem) == MM_MODEM_STATE_FAILED) + g_print (" | failed reason: '%s'\n", + VALIDATE_UNKNOWN (mm_modem_state_failed_reason_get_string (mm_modem_get_state_failed_reason (ctx->modem)))); + + g_print (" | power state: '%s'\n" + " | access tech: '%s'\n" + " | signal quality: '%u' (%s)\n", VALIDATE_UNKNOWN (mm_modem_power_state_get_string (mm_modem_get_power_state (ctx->modem))), VALIDATE_UNKNOWN (access_technologies_string), signal_quality, signal_quality_recent ? "recent" : "cached"); |