Change in osmo-bsc[master]: vty: ensure that all warning messages are prefixed with '%%'
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/19550 ) Change subject: vty: ensure that all warning messages are prefixed with '%%' .. vty: ensure that all warning messages are prefixed with '%%' Change-Id: I6f2348c481ed43904d05b42fd7d5ce04dedbf46b --- M src/osmo-bsc/bsc_vty.c 1 file changed, 57 insertions(+), 55 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/50/19550/1 diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index e4842f7..c1228be 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -1771,7 +1771,7 @@ } if (!new_bts) { - vty_out(vty, "Unable to trigger handover, specified bts #%u does not exist %s", + vty_out(vty, "%% Unable to trigger handover, specified bts #%u does not exist %s", bts_nr_new, VTY_NEWLINE); return CMD_WARNING; } @@ -1793,7 +1793,7 @@ } } - vty_out(vty, "Unable to trigger %s, specified connection (bts=%u,trx=%u,ts=%u,ss=%u) does not exist%s", + vty_out(vty, "%% Unable to trigger %s, specified connection (bts=%u,trx=%u,ts=%u,ss=%u) does not exist%s", action, bts_nr, trx_nr, ts_nr, ss_nr, VTY_NEWLINE); return CMD_WARNING; @@ -1865,7 +1865,7 @@ random_idx %= count; } - vty_out(vty, "Cannot find any ongoing voice calls%s", VTY_NEWLINE); + vty_out(vty, "%% Cannot find any ongoing voice calls%s", VTY_NEWLINE); return NULL; } @@ -1892,7 +1892,7 @@ return bts; } } - vty_out(vty, "Cannot find any BTS (other than BTS %u) with free %s lchan%s", + vty_out(vty, "%% Cannot find any BTS (other than BTS %u) with free %s lchan%s", not_this_bts? not_this_bts->nr : 255, gsm_lchant_name(free_type), VTY_NEWLINE); return NULL; } @@ -2036,7 +2036,7 @@ page_group = gsm0502_calc_paging_group(&bts->si_common.chan_desc, str_to_imsi(argv[1])); - vty_out(vty, "%%Paging group for IMSI %" PRIu64 " on BTS #%d is %u%s", + vty_out(vty, "%% Paging group for IMSI %" PRIu64 " on BTS #%d is %u%s", str_to_imsi(argv[1]), bts->nr, page_group, VTY_NEWLINE); return CMD_SUCCESS; @@ -3197,7 +3197,7 @@ enum bts_gprs_mode mode = bts_gprs_mode_parse(argv[0], NULL); if (!bts_gprs_mode_is_compat(bts, mode)) { - vty_out(vty, "This BTS type does not support %s%s", argv[0], + vty_out(vty, "%% This BTS type does not support %s%s", argv[0], VTY_NEWLINE); return CMD_WARNING; } @@ -3305,7 +3305,7 @@ type = get_string_value(osmo_sitype_strs, argv[0]); if (type < 0) { - vty_out(vty, "Error SI Type%s", VTY_NEWLINE); + vty_out(vty, "%% Error SI Type%s", VTY_NEWLINE); return CMD_WARNING; } @@ -3328,12 +3328,12 @@ type = get_string_value(osmo_sitype_strs, argv[0]); if (type < 0) { - vty_out(vty, "Error SI Type%s", VTY_NEWLINE); + vty_out(vty, "%% Error SI Type%s", VTY_NEWLINE); return CMD_WARNING; } if (!(bts->si_mode_static & (1 << type))) { - vty_out(vty, "SI Type %s is not configured in static mode%s", + vty_out(vty, "%% SI Type %s is not configured in static mode%s", get_value_string(osmo_sitype_strs, type), VTY_NEWLINE); return CMD_WARNING; } @@ -3344,7 +3344,7 @@ /* Parse the user-specified SI in hex format, [partially] overwriting padding */ rc = osmo_hexparse(argv[1], GSM_BTS_SI(bts, type), GSM_MACBLOCK_LEN); if (rc < 0 || rc > GSM_MACBLOCK_LEN) { - vty_out(vty, "Error parsing HEXSTRING%s", VTY_NEWLINE); + vty_out(vty, "%% Error parsing HEXSTRING%s", VTY_NEWLINE); return CMD_WARNING; } @@ -3376,7 +3376,7 @@ struct gsm_bts *bts = vty->index; if (!is_ipaccess_bts(bts) || is_sysmobts_v2(bts)) { - vty_out(vty, "This command is only intended for ipaccess nanoBTS. See OS#3707.%s", + vty_out(vty, "%% This command is only intended for ipaccess nanoBTS. See OS#3707.%s", VTY_NEWLINE); return CMD_WARNING; } @@ -3497,24 +3497,24 @@ switch (r) { case 1: - vty_out(vty, "Warning: multiple threshold-high are not supported, overriding with %u%s", + vty_out(vty, "%% Warning: multiple threshold-high are not supported, overriding with %u%s", thresh_hi, VTY_NEWLINE);
Change in osmo-bsc[master]: vty: ensure that all warning messages are prefixed with '%%'
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/19550 ) Change subject: vty: ensure that all warning messages are prefixed with '%%' .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/19550 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I6f2348c481ed43904d05b42fd7d5ce04dedbf46b Gerrit-Change-Number: 19550 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 11 Aug 2020 06:32:56 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-bsc[master]: vty: ensure that all warning messages are prefixed with '%%'
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/19550 ) Change subject: vty: ensure that all warning messages are prefixed with '%%' .. vty: ensure that all warning messages are prefixed with '%%' Change-Id: I6f2348c481ed43904d05b42fd7d5ce04dedbf46b --- M src/osmo-bsc/bsc_vty.c 1 file changed, 57 insertions(+), 55 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index e4842f7..c1228be 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -1771,7 +1771,7 @@ } if (!new_bts) { - vty_out(vty, "Unable to trigger handover, specified bts #%u does not exist %s", + vty_out(vty, "%% Unable to trigger handover, specified bts #%u does not exist %s", bts_nr_new, VTY_NEWLINE); return CMD_WARNING; } @@ -1793,7 +1793,7 @@ } } - vty_out(vty, "Unable to trigger %s, specified connection (bts=%u,trx=%u,ts=%u,ss=%u) does not exist%s", + vty_out(vty, "%% Unable to trigger %s, specified connection (bts=%u,trx=%u,ts=%u,ss=%u) does not exist%s", action, bts_nr, trx_nr, ts_nr, ss_nr, VTY_NEWLINE); return CMD_WARNING; @@ -1865,7 +1865,7 @@ random_idx %= count; } - vty_out(vty, "Cannot find any ongoing voice calls%s", VTY_NEWLINE); + vty_out(vty, "%% Cannot find any ongoing voice calls%s", VTY_NEWLINE); return NULL; } @@ -1892,7 +1892,7 @@ return bts; } } - vty_out(vty, "Cannot find any BTS (other than BTS %u) with free %s lchan%s", + vty_out(vty, "%% Cannot find any BTS (other than BTS %u) with free %s lchan%s", not_this_bts? not_this_bts->nr : 255, gsm_lchant_name(free_type), VTY_NEWLINE); return NULL; } @@ -2036,7 +2036,7 @@ page_group = gsm0502_calc_paging_group(&bts->si_common.chan_desc, str_to_imsi(argv[1])); - vty_out(vty, "%%Paging group for IMSI %" PRIu64 " on BTS #%d is %u%s", + vty_out(vty, "%% Paging group for IMSI %" PRIu64 " on BTS #%d is %u%s", str_to_imsi(argv[1]), bts->nr, page_group, VTY_NEWLINE); return CMD_SUCCESS; @@ -3197,7 +3197,7 @@ enum bts_gprs_mode mode = bts_gprs_mode_parse(argv[0], NULL); if (!bts_gprs_mode_is_compat(bts, mode)) { - vty_out(vty, "This BTS type does not support %s%s", argv[0], + vty_out(vty, "%% This BTS type does not support %s%s", argv[0], VTY_NEWLINE); return CMD_WARNING; } @@ -3305,7 +3305,7 @@ type = get_string_value(osmo_sitype_strs, argv[0]); if (type < 0) { - vty_out(vty, "Error SI Type%s", VTY_NEWLINE); + vty_out(vty, "%% Error SI Type%s", VTY_NEWLINE); return CMD_WARNING; } @@ -3328,12 +3328,12 @@ type = get_string_value(osmo_sitype_strs, argv[0]); if (type < 0) { - vty_out(vty, "Error SI Type%s", VTY_NEWLINE); + vty_out(vty, "%% Error SI Type%s", VTY_NEWLINE); return CMD_WARNING; } if (!(bts->si_mode_static & (1 << type))) { - vty_out(vty, "SI Type %s is not configured in static mode%s", + vty_out(vty, "%% SI Type %s is not configured in static mode%s", get_value_string(osmo_sitype_strs, type), VTY_NEWLINE); return CMD_WARNING; } @@ -3344,7 +3344,7 @@ /* Parse the user-specified SI in hex format, [partially] overwriting padding */ rc = osmo_hexparse(argv[1], GSM_BTS_SI(bts, type), GSM_MACBLOCK_LEN); if (rc < 0 || rc > GSM_MACBLOCK_LEN) { - vty_out(vty, "Error parsing HEXSTRING%s", VTY_NEWLINE); + vty_out(vty, "%% Error parsing HEXSTRING%s", VTY_NEWLINE); return CMD_WARNING; } @@ -3376,7 +3376,7 @@ struct gsm_bts *bts = vty->index; if (!is_ipaccess_bts(bts) || is_sysmobts_v2(bts)) { - vty_out(vty, "This command is only intended for ipaccess nanoBTS. See OS#3707.%s", + vty_out(vty, "%% This command is only intended for ipaccess nanoBTS. See OS#3707.%s", VTY_NEWLINE); return CMD_WARNING; } @@ -3497,24 +3497,24 @@ switch (r) { case 1: - vty_out(vty, "Warning: multiple threshold-high are not supported, overriding with %u%s", + vty_out(vty, "%% Warning: multiple threshold-high are not supported, overriding with %u%s", thresh_hi, VTY_NEWLINE); break;