aboutsummaryrefslogtreecommitdiff
path: root/cli/mmcli-modem.c
diff options
context:
space:
mode:
authorBen Chan <benchan@chromium.org>2017-09-17 20:08:42 -0700
committerAleksander Morgado <aleksander@aleksander.es>2017-09-20 09:56:23 -0700
commit4a5a73eb1e76d1d3ca42b26c8e2f1998c106ab91 (patch)
tree03a0651991569124564cc2af4b0d4283f2e5453a /cli/mmcli-modem.c
parent9c6a1ebb1e9864edba2279d0a90986db684af1a4 (diff)
cli: show hardware revision property of Modem interface
Diffstat (limited to 'cli/mmcli-modem.c')
-rw-r--r--cli/mmcli-modem.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/mmcli-modem.c b/cli/mmcli-modem.c
index 39890c69..a3c1152c 100644
--- a/cli/mmcli-modem.c
+++ b/cli/mmcli-modem.c
@@ -250,6 +250,7 @@ print_modem_info (void)
{
gchar *drivers_string;
gchar *prefixed_revision;
+ gchar *prefixed_hardware_revision;
gchar *supported_capabilities_string;
MMModemCapability *capabilities = NULL;
guint n_capabilities = 0;
@@ -340,6 +341,12 @@ print_modem_info (void)
else
prefixed_revision = NULL;
+ if (mm_modem_get_hardware_revision (ctx->modem))
+ prefixed_hardware_revision = mmcli_prefix_newlines (" | ",
+ mm_modem_get_hardware_revision (ctx->modem));
+ else
+ prefixed_hardware_revision = NULL;
+
if (supported_modes_string) {
gchar *prefixed;
@@ -381,12 +388,14 @@ print_modem_info (void)
" Hardware | manufacturer: '%s'\n"
" | model: '%s'\n"
" | revision: '%s'\n"
+ " | H/W revision: '%s'\n"
" | supported: '%s'\n"
" | current: '%s'\n"
" | equipment id: '%s'\n",
VALIDATE_UNKNOWN (mm_modem_get_manufacturer (ctx->modem)),
VALIDATE_UNKNOWN (mm_modem_get_model (ctx->modem)),
VALIDATE_UNKNOWN (prefixed_revision),
+ VALIDATE_UNKNOWN (prefixed_hardware_revision),
VALIDATE_UNKNOWN (supported_capabilities_string),
VALIDATE_UNKNOWN (current_capabilities_string),
VALIDATE_UNKNOWN (mm_modem_get_equipment_identifier (ctx->modem)));
@@ -533,6 +542,7 @@ print_modem_info (void)
g_free (supported_capabilities_string);
g_free (current_capabilities_string);
g_free (prefixed_revision);
+ g_free (prefixed_hardware_revision);
g_free (allowed_modes_string);
g_free (preferred_mode_string);
g_free (supported_modes_string);