Skip to content

Commit

Permalink
*: remove VTYNL, part 3 of 6
Browse files Browse the repository at this point in the history
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
  • Loading branch information
eqvinox committed Jul 14, 2017
1 parent 26a429f commit 61b7d44
Show file tree
Hide file tree
Showing 27 changed files with 100 additions and 136 deletions.
6 changes: 2 additions & 4 deletions bgpd/bgp_evpn_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ bgp_show_ethernet_vpn(struct vty *vty, struct prefix_rd *prd,
vty_out (vty,
"Status codes: s suppressed, d damped, h history, * valid, > best, i - internal\n");
vty_out (vty,
"Origin codes: i - IGP, e - EGP, ? - incomplete%s\n",
VTYNL);
"Origin codes: i - IGP, e - EGP, ? - incomplete\n\n");
vty_out(vty, V4_HEADER);
}
}
Expand Down Expand Up @@ -256,8 +255,7 @@ bgp_show_ethernet_vpn(struct vty *vty, struct prefix_rd *prd,
vty_out (vty, "No prefixes displayed, %ld exist\n",
total_count);
else
vty_out (vty, "%sDisplayed %ld out of %ld total prefixes\n",
VTYNL, output_count, total_count);
vty_out (vty, "\nDisplayed %ld out of %ld total prefixes\n", output_count, total_count);
return CMD_SUCCESS;
}

Expand Down
6 changes: 2 additions & 4 deletions bgpd/bgp_mplsvpn.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,7 @@ bgp_show_mpls_vpn (struct vty *vty, afi_t afi, struct prefix_rd *prd,
inet_ntoa(bgp->router_id));
vty_out (vty,
"Status codes: s suppressed, d damped, h history, * valid, > best, i - internal\n");
vty_out (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete%s\n",
VTYNL);
vty_out (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete\n\n");
vty_out (vty, V4_HEADER);
}
}
Expand Down Expand Up @@ -749,8 +748,7 @@ bgp_show_mpls_vpn (struct vty *vty, afi_t afi, struct prefix_rd *prd,
if (output_count == 0)
vty_out (vty, "No prefixes displayed, %ld exist\n", total_count);
else
vty_out (vty, "%sDisplayed %ld routes and %ld total paths\n",
VTYNL, output_count, total_count);
vty_out (vty, "\nDisplayed %ld routes and %ld total paths\n", output_count, total_count);
}

return CMD_SUCCESS;
Expand Down
3 changes: 1 addition & 2 deletions bgpd/bgp_nexthop.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,7 @@ bgp_show_all_instances_nexthops_vty (struct vty *vty)

for (ALL_LIST_ELEMENTS (bm->bgp, node, nnode, bgp))
{
vty_out (vty, "%sInstance %s:\n",
VTYNL,
vty_out (vty, "\nInstance %s:\n",
(bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) ? "Default" : bgp->name);
bgp_show_nexthops (vty, bgp, 0);
}
Expand Down
29 changes: 12 additions & 17 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -6191,7 +6191,7 @@ route_vty_out_route (struct prefix *p, struct vty *vty)

len = 17 - len;
if (len < 1)
vty_out (vty, "%s%*s", VTYNL, 20, " ");
vty_out (vty, "\n%*s", 20, " ");
else
vty_out (vty, "%*s", len, " ");
}
Expand Down Expand Up @@ -6415,7 +6415,7 @@ route_vty_out (struct vty *vty, struct prefix *p,
len = 7 - len; /* len of IPv6 addr + max len of def ifname */

if (len < 1)
vty_out (vty, "%s%*s", VTYNL, 45, " ");
vty_out (vty, "\n%*s", 45, " ");
else
vty_out (vty, "%*s", len, " ");
}
Expand All @@ -6428,7 +6428,7 @@ route_vty_out (struct vty *vty, struct prefix *p,
len = 16 - len;

if (len < 1)
vty_out (vty, "%s%*s", VTYNL, 36, " ");
vty_out (vty, "\n%*s", 36, " ");
else
vty_out (vty, "%*s", len, " ");
}
Expand All @@ -6442,7 +6442,7 @@ route_vty_out (struct vty *vty, struct prefix *p,
len = 16 - len;

if (len < 1)
vty_out (vty, "%s%*s", VTYNL, 36, " ");
vty_out (vty, "\n%*s", 36, " ");
else
vty_out (vty, "%*s", len, " ");
}
Expand Down Expand Up @@ -6630,7 +6630,7 @@ route_vty_out_tmp (struct vty *vty, struct prefix *p, struct attr *attr, safi_t
buf, BUFSIZ));
len = 16 - len;
if (len < 1)
vty_out (vty, "%s%*s", VTYNL, 36, " ");
vty_out (vty, "\n%*s", 36, " ");
else
vty_out (vty, "%*s", len, " ");
}
Expand Down Expand Up @@ -6884,7 +6884,7 @@ damp_route_vty_out (struct vty *vty, struct prefix *p, struct bgp_info *binfo,
if (len < 1)
{
if (!use_json)
vty_out (vty, "%s%*s", VTYNL, 34, " ");
vty_out (vty, "\n%*s", 34, " ");
}
else
{
Expand Down Expand Up @@ -6954,7 +6954,7 @@ flap_route_vty_out (struct vty *vty, struct prefix *p, struct bgp_info *binfo,
if (len < 1)
{
if (!use_json)
vty_out (vty, "%s%*s", VTYNL, 33, " ");
vty_out (vty, "\n%*s", 33, " ");
}
else
{
Expand Down Expand Up @@ -8043,8 +8043,7 @@ bgp_show_table (struct vty *vty, struct bgp *bgp, struct bgp_table *table,
total_count);
}
else
vty_out (vty, "%sDisplayed %ld routes and %ld total paths\n",
VTYNL, output_count, total_count);
vty_out (vty, "\nDisplayed %ld routes and %ld total paths\n", output_count, total_count);
}

return CMD_SUCCESS;
Expand Down Expand Up @@ -8105,8 +8104,7 @@ bgp_show_all_instances_routes_vty (struct vty *vty, afi_t afi, safi_t safi,
}
else
{
vty_out (vty, "%sInstance %s:\n",
VTYNL,
vty_out (vty, "\nInstance %s:\n",
(bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) ? "Default" : bgp->name);
}
bgp_show (vty, bgp, afi, safi, bgp_show_type_normal, NULL, use_json);
Expand Down Expand Up @@ -9422,8 +9420,7 @@ bgp_peer_counts (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi, u_c
}

vty_out (vty, "PfxCt: %ld\n", peer->pcount[afi][safi]);
vty_out (vty, "%sCounts from RIB table walk:%s\n",
VTYNL, VTYNL);
vty_out (vty, "\nCounts from RIB table walk:\n\n");

for (i = 0; i < PCOUNT_MAX; i++)
vty_out (vty, "%20s: %-10d\n", pcount_strs[i], pcounts.count[i]);
Expand Down Expand Up @@ -9649,8 +9646,7 @@ show_adj_route (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi,
vty_out (vty, BGP_SHOW_SCODE_HEADER);
vty_out (vty, BGP_SHOW_OCODE_HEADER);

vty_out (vty, "Originating default network 0.0.0.0%s\n",
VTYNL);
vty_out (vty, "Originating default network 0.0.0.0\n\n");
}
header1 = 0;
}
Expand Down Expand Up @@ -9757,8 +9753,7 @@ show_adj_route (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi,
if (use_json)
json_object_int_add(json, "totalPrefixCounter", output_count);
else
vty_out (vty, "%sTotal number of prefixes %ld\n",
VTYNL, output_count);
vty_out (vty, "\nTotal number of prefixes %ld\n", output_count);
}
if (use_json)
{
Expand Down
3 changes: 1 addition & 2 deletions bgpd/bgp_updgrp_adv.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,7 @@ subgrp_show_adjq_vty (struct update_subgroup *subgrp, struct vty *vty,
}
}
if (output_count != 0)
vty_out (vty, "%sTotal number of prefixes %ld\n",
VTYNL, output_count);
vty_out (vty, "\nTotal number of prefixes %ld\n", output_count);
}

static int
Expand Down
3 changes: 1 addition & 2 deletions bgpd/bgp_vpn.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ show_adj_route_vpn (struct vty *vty, struct peer *peer, struct prefix_rd *prd,
inet_ntoa(bgp->router_id));
vty_out (vty,
"Status codes: s suppressed, d damped, h history, * valid, > best, i - internal\n");
vty_out (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete%s\n",
VTYNL);
vty_out (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete\n\n");
vty_out (vty, V4_HEADER);
}
header = 0;
Expand Down
34 changes: 13 additions & 21 deletions bgpd/bgp_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -6628,8 +6628,7 @@ DEFUN (show_bgp_vrfs,
else
{
if (count)
vty_out (vty, "%sTotal number of VRFs (including default): %d%s",
VTYNL, count, VTYNL);
vty_out (vty, "\nTotal number of VRFs (including default): %d%s", count, VTYNL);
}

return CMD_SUCCESS;
Expand Down Expand Up @@ -7111,7 +7110,7 @@ bgp_show_summary (struct vty *vty, struct bgp *bgp, int afi, int safi,
else
{
if (count)
vty_out (vty, "%sTotal number of neighbors %d%s", VTYNL,
vty_out (vty, "\nTotal number of neighbors %d%s",
count, VTYNL);
else
{
Expand Down Expand Up @@ -7198,8 +7197,7 @@ bgp_show_summary_afi_safi (struct vty *vty, struct bgp *bgp, int afi, int safi,
}
else
{
vty_out (vty, "%s%s Summary:%s",
VTYNL, afi_safi_print(afi, safi), VTYNL);
vty_out (vty, "\n%s Summary:%s", afi_safi_print(afi, safi), VTYNL);
}
}
bgp_show_summary (vty, bgp, afi, safi, use_json, json);
Expand Down Expand Up @@ -7251,8 +7249,7 @@ bgp_show_all_instances_summary_vty (struct vty *vty, afi_t afi, safi_t safi,
}
else
{
vty_out (vty, "%sInstance %s:%s",
VTYNL,
vty_out (vty, "\nInstance %s:%s",
(bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)
? "Default" : bgp->name, VTYNL);
}
Expand Down Expand Up @@ -8493,7 +8490,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js

if (CHECK_FLAG (p->cap, PEER_CAP_ENHE_RCV))
{
vty_out (vty, " Address families by peer:%s ", VTYNL);
vty_out (vty, " Address families by peer:\n ");
for (safi = SAFI_UNICAST ; safi < SAFI_MAX ; safi++)
if (CHECK_FLAG (p->af_cap[AFI_IP][safi], PEER_CAP_ENHE_AF_RCV))
vty_out (vty, " %s%s",
Expand Down Expand Up @@ -8564,7 +8561,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js

vty_out (vty, " Remote Restart timer is %d seconds%s",
p->v_gr_restart, VTYNL);
vty_out (vty, " Address families by peer:%s ", VTYNL);
vty_out (vty, " Address families by peer:\n ");

for (afi = AFI_IP ; afi < AFI_MAX ; afi++)
for (safi = SAFI_UNICAST ; safi < SAFI_MAX ; safi++)
Expand Down Expand Up @@ -8865,7 +8862,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
if (p->last_reset_cause_size)
{
msg = p->last_reset_cause;
vty_out(vty, " Message received that caused BGP to send a NOTIFICATION:%s ", VTYNL);
vty_out(vty, " Message received that caused BGP to send a NOTIFICATION:\n ");
for (i = 1; i <= p->last_reset_cause_size; i++)
{
vty_out(vty, "%02X", *msg++);
Expand All @@ -8874,7 +8871,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
{
if (i % 16 == 0)
{
vty_out(vty, "%s ", VTYNL);
vty_out(vty, "\n ");
}
else if (i % 4 == 0)
{
Expand Down Expand Up @@ -9185,8 +9182,7 @@ bgp_show_all_instances_neighbors_vty (struct vty *vty, u_char use_json)
}
else
{
vty_out (vty, "%sInstance %s:%s",
VTYNL,
vty_out (vty, "\nInstance %s:%s",
(bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)
? "Default" : bgp->name,
VTYNL);
Expand Down Expand Up @@ -9403,8 +9399,7 @@ bgp_show_all_instances_updgrps_vty (struct vty *vty, afi_t afi, safi_t safi)

for (ALL_LIST_ELEMENTS (bm->bgp, node, nnode, bgp))
{
vty_out (vty, "%sInstance %s:%s",
VTYNL,
vty_out (vty, "\nInstance %s:%s",
(bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) ? "Default" : bgp->name,
VTYNL);
update_group_show(bgp, afi, safi, vty, 0);
Expand Down Expand Up @@ -9789,14 +9784,11 @@ bgp_show_one_peer_group (struct vty *vty, struct peer_group *group)

if (conf->as_type == AS_SPECIFIED ||
conf->as_type == AS_EXTERNAL) {
vty_out (vty, "%sBGP peer-group %s, remote AS %d%s",
VTYNL, group->name, conf->as, VTYNL);
vty_out (vty, "\nBGP peer-group %s, remote AS %d%s", group->name, conf->as, VTYNL);
} else if (conf->as_type == AS_INTERNAL) {
vty_out (vty, "%sBGP peer-group %s, remote AS %d%s",
VTYNL, group->name, group->bgp->as, VTYNL);
vty_out (vty, "\nBGP peer-group %s, remote AS %d%s", group->name, group->bgp->as, VTYNL);
} else {
vty_out (vty, "%sBGP peer-group %s%s",
VTYNL, group->name, VTYNL);
vty_out (vty, "\nBGP peer-group %s%s", group->name, VTYNL);
}

if ((group->bgp->as == conf->as) || (conf->as_type == AS_INTERNAL))
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -7296,7 +7296,7 @@ bgp_config_write_family_header (struct vty *vty, afi_t afi, safi_t safi,
if (*write)
return;

vty_out (vty, " !%s address-family ", VTYNL);
vty_out (vty, " !\n address-family ");

if (afi == AFI_IP)
{
Expand Down
3 changes: 1 addition & 2 deletions bgpd/rfapi/rfapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -3837,8 +3837,7 @@ DEFUN (debug_rfapi_show_import,
lni = lni_as_ptr;
if (first_l2)
{
vty_out (vty, "%sLNI-based Ethernet Tables:\n",
VTYNL);
vty_out (vty, "\nLNI-based Ethernet Tables:\n");
first_l2 = 0;
}
snprintf (buf, BUFSIZ, "L2VPN LNI=%u", lni);
Expand Down
9 changes: 3 additions & 6 deletions eigrpd/eigrp_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ void
show_ip_eigrp_interface_header (struct vty *vty, struct eigrp *eigrp)
{

vty_out (vty, "%s%s%d%s%s%s %-10s %-10s %-10s %-6s %-12s %-7s %-14s %-12s %-8s %-8s %-8s%s %-39s %-12s %-7s %-14s %-12s %-8s\n",
VTYNL,
vty_out (vty, "\n%s%d%s%s%s %-10s %-10s %-10s %-6s %-12s %-7s %-14s %-12s %-8s %-8s %-8s%s %-39s %-12s %-7s %-14s %-12s %-8s\n",
"EIGRP interfaces for AS(",eigrp->AS,")",VTYNL,VTYNL,
"Interface", "Bandwidth", "Delay", "Peers", "Xmit Queue", "Mean",
"Pacing Time", "Multicast", "Pending", "Hello", "Holdtime",
Expand Down Expand Up @@ -257,8 +256,7 @@ show_ip_eigrp_interface_detail (struct vty *vty, struct eigrp *eigrp,
void
show_ip_eigrp_neighbor_header (struct vty *vty, struct eigrp *eigrp)
{
vty_out (vty, "%s%s%d%s%s%s%-3s %-17s %-20s %-6s %-8s %-6s %-5s %-5s %-5s%s %-41s %-6s %-8s %-6s %-4s %-6s %-5s \n",
VTYNL,
vty_out (vty, "\n%s%d%s%s%s%-3s %-17s %-20s %-6s %-8s %-6s %-5s %-5s %-5s%s %-41s %-6s %-8s %-6s %-4s %-6s %-5s \n",
"EIGRP neighbors for AS(",eigrp->AS,")",VTYNL,VTYNL,
"H", "Address", "Interface", "Hold", "Uptime",
"SRTT", "RTO", "Q", "Seq", VTYNL
Expand Down Expand Up @@ -298,8 +296,7 @@ show_ip_eigrp_topology_header (struct vty *vty, struct eigrp *eigrp)
struct in_addr router_id;
router_id.s_addr = eigrp->router_id;

vty_out (vty, "%sEIGRP Topology Table for AS(%d)/ID(%s)%s\n",
VTYNL, eigrp->AS, inet_ntoa(router_id), VTYNL);
vty_out (vty, "\nEIGRP Topology Table for AS(%d)/ID(%s)%s\n", eigrp->AS, inet_ntoa(router_id), VTYNL);
vty_out (vty, "Codes: P - Passive, A - Active, U - Update, Q - Query, "
"R - Reply%s r - reply Status, s - sia Status%s\n",
VTYNL, VTYNL);
Expand Down
4 changes: 2 additions & 2 deletions isisd/isis_te.c
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ show_vty_unknown_tlv (struct vty *vty, struct subtlv_header *tlvh)
vty_out (vty, " %#.2x", v[i]);
if (rtn == 8)
{
vty_out (vty, "%s [%.2x]", VTYNL, i + 1);
vty_out (vty, "\n [%.2x]", i + 1);
rtn = 1;
}
else
Expand Down Expand Up @@ -1299,7 +1299,7 @@ show_mpls_te_sub (struct vty *vty, struct interface *ifp)
show_vty_subtlv_res_bw (vty, &mtc->res_bw);
show_vty_subtlv_ava_bw (vty, &mtc->ava_bw);
show_vty_subtlv_use_bw (vty, &mtc->use_bw);
vty_out (vty, "---------------%s\n", VTYNL);
vty_out (vty, "---------------\n\n");
}
else
{
Expand Down
6 changes: 3 additions & 3 deletions ldpd/ldp_vty_exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ show_discovery_msg(struct vty *vty, struct imsg *imsg,

vty_out(vty, "%-8s %-15s ", "Targeted", addr);
if (strlen(addr) > 15)
vty_out(vty, "%s%46s", VTYNL, " ");
vty_out(vty, "\n%46s", " ");
break;
}
vty_out (vty, "%9u\n", adj->holdtime);
Expand Down Expand Up @@ -511,7 +511,7 @@ show_nbr_msg(struct vty *vty, struct imsg *imsg, struct show_params *params)
af_name(nbr->af), inet_ntoa(nbr->id),
nbr_state_name(nbr->nbr_state), addr);
if (strlen(addr) > 15)
vty_out(vty, "%s%48s", VTYNL, " ");
vty_out(vty, "\n%48s", " ");
vty_out (vty, " %8s\n", log_time(nbr->uptime));
break;
case IMSG_CTL_END:
Expand Down Expand Up @@ -1021,7 +1021,7 @@ show_lib_msg(struct vty *vty, struct imsg *imsg, struct show_params *params)

vty_out(vty, "%-4s %-20s", af_name(rt->af), dstnet);
if (strlen(dstnet) > 20)
vty_out(vty, "%s%25s", VTYNL, " ");
vty_out(vty, "\n%25s", " ");
vty_out (vty, " %-15s %-11s %-13s %6s\n", inet_ntoa(rt->nexthop),
log_label(rt->local_label), log_label(rt->remote_label),
rt->in_use ? "yes" : "no");
Expand Down
Loading

0 comments on commit 61b7d44

Please sign in to comment.