if (bgp == NULL)
{
if (!use_json)
- vty_outln (vty, "No BGP process is configured");
+ vty_out (vty, "No BGP process is configured\n");
return CMD_WARNING;
}
+
/* use MPLS and ENCAP specific shows until they are merged */
if (safi == SAFI_MPLS_VPN)
{
{
struct bgp_table_stats ts;
unsigned int i;
-
+
if (!bgp->rib[afi][safi])
{
- vty_outln (vty, "%% No RIB exist's for the AFI(%d)/SAFI(%d)",
+ vty_out (vty, "%% No RIB exist's for the AFI(%d)/SAFI(%d)\n",
afi, safi);
return CMD_WARNING;
}
-
+
- vty_outln (vty, "BGP %s RIB statistics%s",
- afi_safi_print (afi, safi), VTYNL);
++ vty_out (vty, "BGP %s RIB statistics\n",
++ afi_safi_print (afi, safi));
+
+ /* labeled-unicast routes live in the unicast table */
+ if (safi == SAFI_LABELED_UNICAST)
+ safi = SAFI_UNICAST;
+
memset (&ts, 0, sizeof (ts));
ts.table = bgp->rib[afi][safi];
thread_execute (bm->master, bgp_table_stats_walker, &ts, 0);
vector varcomps = vector_init (VECTOR_MIN_SIZE);
cmd_variable_complete (token, ref, varcomps);
- if (vector_active(varcomps) > 0)
+ if (vector_active (varcomps) > 0)
{
- vty_out(vty, " ");
- for (size_t j = 0; j < vector_active (varcomps); j++)
- {
- char *item = vector_slot (varcomps, j);
- vty_out(vty, " %s", item);
- XFREE(MTYPE_COMPLETION, item);
- }
- vty_out (vty, "\n");
- char *ac = cmd_variable_comp2str(varcomps, vty->width, VTYNL);
- vty_outln(vty, "%s", ac);
++ char *ac = cmd_variable_comp2str(varcomps, vty->width, "\n");
++ vty_out(vty, "%s\n", ac);
+ XFREE(MTYPE_TMP, ac);
}
+
vector_free(varcomps);
}
#if 0