cli: report as 'none' when no SIM path is given
Instead of giving '/'
This commit is contained in:
@@ -266,8 +266,8 @@ print_modem_info (void)
|
|||||||
* easiest to maintain */
|
* easiest to maintain */
|
||||||
#undef VALIDATE_UNKNOWN
|
#undef VALIDATE_UNKNOWN
|
||||||
#define VALIDATE_UNKNOWN(str) (str ? str : "unknown")
|
#define VALIDATE_UNKNOWN(str) (str ? str : "unknown")
|
||||||
#undef VALIDATE_NONE
|
#undef VALIDATE_PATH
|
||||||
#define VALIDATE_NONE(str) (str ? str : "none")
|
#define VALIDATE_PATH(str) ((str && !g_str_equal (str, "/")) ? str : "none")
|
||||||
|
|
||||||
/* Strings with mixed properties */
|
/* Strings with mixed properties */
|
||||||
unlock_required = mm_modem_get_unlock_required (ctx->modem);
|
unlock_required = mm_modem_get_unlock_required (ctx->modem);
|
||||||
@@ -381,7 +381,7 @@ print_modem_info (void)
|
|||||||
/* SIM */
|
/* SIM */
|
||||||
g_print (" -------------------------\n"
|
g_print (" -------------------------\n"
|
||||||
" SIM | path: '%s'\n",
|
" SIM | path: '%s'\n",
|
||||||
VALIDATE_NONE (mm_modem_get_sim_path (ctx->modem)));
|
VALIDATE_PATH (mm_modem_get_sim_path (ctx->modem)));
|
||||||
g_print ("\n");
|
g_print ("\n");
|
||||||
|
|
||||||
g_free (allowed_bands_string);
|
g_free (allowed_bands_string);
|
||||||
|
Reference in New Issue
Block a user