cli: remove unneeded EOLs when printing PCOs

E.g. in the key-value output:
  modem.3gpp.pco.length   : 2
  modem.3gpp.pco.value[1] : session-id: 1, complete: yes, data: 270180\n
  modem.3gpp.pco.value[2] : session-id: 2, complete: yes, data: 271480802110030100108106503A3DFA8306503A3DFE\n

Or in the human output:
  ----------------------------------
  3GPP     |
           |                    pco: 1: (complete) '270180'

           |                         2: (complete) '271480802110030100108106503A3DFA8306503A3DFE'

  ----------------------------------
  3GPP EPS |   ue mode of operation: csps-2
This commit is contained in:
Aleksander Morgado
2023-03-07 11:33:18 +00:00
parent 592f8b6364
commit 4903a1ed74

View File

@@ -914,12 +914,12 @@ mmcli_output_pco_list (GList *pco_list)
pco_data_hex = (pco_data ? mm_utils_bin2hexstr (pco_data, pco_data_size) : NULL);
if (selected_type == MMC_OUTPUT_TYPE_HUMAN)
g_ptr_array_add (aux, g_strdup_printf ("%u: (%s) '%s'\n",
g_ptr_array_add (aux, g_strdup_printf ("%u: (%s) '%s'",
mm_pco_get_session_id (pco),
mm_pco_is_complete (pco) ? "complete" : "partial",
pco_data_hex ? pco_data_hex : ""));
else
g_ptr_array_add (aux, g_strdup_printf ("session-id: %u, complete: %s, data: %s\n",
g_ptr_array_add (aux, g_strdup_printf ("session-id: %u, complete: %s, data: %s",
mm_pco_get_session_id (pco),
mm_pco_is_complete (pco) ? "yes" : "no",
pco_data_hex ? pco_data_hex : ""));