cli: show a nicer modem description if manufacturer or model is unknown

This commit is contained in:
Ben Chan
2014-05-28 23:12:30 -07:00
committed by Aleksander Morgado
parent 08d8524b17
commit f0542aa809

View File

@@ -190,10 +190,15 @@ scan_devices_ready (MMManager *manager,
static void static void
print_modem_short_info (MMObject *modem) 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", g_print ("\t%s [%s] %s\n",
mm_object_get_path (modem), mm_object_get_path (modem),
mm_modem_get_manufacturer (mm_object_peek_modem (modem)), manufacturer ? manufacturer : "unknown",
mm_modem_get_model (mm_object_peek_modem (modem))); model ? model : "unknown");
} }
static void static void