[PATCH] cli: show a nicer modem description if manufacturer or model is unknown
Aleksander Morgado
aleksander at aleksander.es
Thu May 29 01:10:45 PDT 2014
On 29/05/14 08:12, Ben Chan wrote:
> diff --git a/cli/mmcli-manager.c b/cli/mmcli-manager.c
> index 3278367..a420e64 100644
> --- a/cli/mmcli-manager.c
> +++ b/cli/mmcli-manager.c
Pushed, thanks.
> @@ -190,10 +190,15 @@ scan_devices_ready (MMManager *manager,
> static void
> print_modem_short_info (MMObject *modem)
> {
> + const gchar *manufacturer, *model;
> +
> + manufacturer = mm_modem_get_manufacturer (mm_object_peek_modem (modem));
> + model = mm_modem_get_model (mm_object_peek_modem (modem));
> +
> g_print ("\t%s [%s] %s\n",
> mm_object_get_path (modem),
> - mm_modem_get_manufacturer (mm_object_peek_modem (modem)),
> - mm_modem_get_model (mm_object_peek_modem (modem)));
> + manufacturer ? manufacturer : "unknown",
> + model ? model : "unknown");
> }
>
> static void
>
--
Aleksander
https://aleksander.es
More information about the ModemManager-devel
mailing list