Skip to content

Commit

Permalink
*: s/VTY_NEWLINE/VTYNL/g
Browse files Browse the repository at this point in the history
Should be able to fit more vty_out onto one line now

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
  • Loading branch information
qlyoung committed Jun 29, 2017
1 parent 96ade3e commit 1318e7c
Show file tree
Hide file tree
Showing 47 changed files with 1,032 additions and 1,041 deletions.
16 changes: 8 additions & 8 deletions babeld/babel_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,15 +387,15 @@ show_babel_main_configuration (struct vty *vty)
"vty port = %d%s"
"id = %s%s"
"kernel_metric = %d",
state_file, VTY_NEWLINE,
state_file, VTYNL,
babel_config_file ? babel_config_file : babel_config_default,
VTY_NEWLINE,
VTY_NEWLINE,
format_address(protocol_group), VTY_NEWLINE,
protocol_port, VTY_NEWLINE,
VTYNL,
VTYNL,
format_address(protocol_group), VTYNL,
protocol_port, VTYNL,
babel_vty_addr ? babel_vty_addr : "None",
VTY_NEWLINE,
babel_vty_port, VTY_NEWLINE,
format_eui64(myid), VTY_NEWLINE,
VTYNL,
babel_vty_port, VTYNL,
format_eui64(myid), VTYNL,
kernel_metric);
}
4 changes: 2 additions & 2 deletions bgpd/bgp_evpn_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ bgp_show_ethernet_vpn(struct vty *vty, struct prefix_rd *prd,
"Status codes: s suppressed, d damped, h history, * valid, > best, i - internal");
vty_outln (vty,
"Origin codes: i - IGP, e - EGP, ? - incomplete%s",
VTY_NEWLINE);
VTYNL);
vty_outln(vty, V4_HEADER);
}
}
Expand Down Expand Up @@ -257,7 +257,7 @@ bgp_show_ethernet_vpn(struct vty *vty, struct prefix_rd *prd,
total_count);
else
vty_outln (vty, "%sDisplayed %ld out of %ld total prefixes",
VTY_NEWLINE, output_count, total_count);
VTYNL, output_count, total_count);
return CMD_SUCCESS;
}

Expand Down
4 changes: 2 additions & 2 deletions bgpd/bgp_mplsvpn.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ bgp_show_mpls_vpn (struct vty *vty, afi_t afi, struct prefix_rd *prd,
vty_outln (vty,
"Status codes: s suppressed, d damped, h history, * valid, > best, i - internal");
vty_outln (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete%s",
VTY_NEWLINE);
VTYNL);
vty_outln (vty, V4_HEADER);
}
}
Expand Down Expand Up @@ -746,7 +746,7 @@ bgp_show_mpls_vpn (struct vty *vty, afi_t afi, struct prefix_rd *prd,
vty_outln (vty, "No prefixes displayed, %ld exist", total_count);
else
vty_outln (vty, "%sDisplayed %ld routes and %ld total paths",
VTY_NEWLINE, output_count, total_count);
VTYNL, output_count, total_count);
}

return CMD_SUCCESS;
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_nexthop.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ bgp_show_all_instances_nexthops_vty (struct vty *vty)
for (ALL_LIST_ELEMENTS (bm->bgp, node, nnode, bgp))
{
vty_outln (vty, "%sInstance %s:",
VTY_NEWLINE,
VTYNL,
(bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) ? "Default" : bgp->name);
bgp_show_nexthops (vty, bgp, 0);
}
Expand Down
42 changes: 21 additions & 21 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -6169,7 +6169,7 @@ route_vty_out_route (struct prefix *p, struct vty *vty)

len = 17 - len;
if (len < 1)
vty_out (vty, "%s%*s", VTY_NEWLINE, 20, " ");
vty_out (vty, "%s%*s", VTYNL, 20, " ");
else
vty_out (vty, "%*s", len, " ");
}
Expand Down Expand Up @@ -6393,7 +6393,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", VTY_NEWLINE, 45, " ");
vty_out (vty, "%s%*s", VTYNL, 45, " ");
else
vty_out (vty, "%*s", len, " ");
}
Expand All @@ -6406,7 +6406,7 @@ route_vty_out (struct vty *vty, struct prefix *p,
len = 16 - len;

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

if (len < 1)
vty_out (vty, "%s%*s", VTY_NEWLINE, 36, " ");
vty_out (vty, "%s%*s", VTYNL, 36, " ");
else
vty_out (vty, "%*s", len, " ");
}
Expand Down Expand Up @@ -6608,7 +6608,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", VTY_NEWLINE, 36, " ");
vty_out (vty, "%s%*s", VTYNL, 36, " ");
else
vty_out (vty, "%*s", len, " ");
}
Expand Down Expand Up @@ -6861,7 +6861,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", VTY_NEWLINE, 34, " ");
vty_out (vty, "%s%*s", VTYNL, 34, " ");
}
else
{
Expand Down Expand Up @@ -6931,7 +6931,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", VTY_NEWLINE, 33, " ");
vty_out (vty, "%s%*s", VTYNL, 33, " ");
}
else
{
Expand Down Expand Up @@ -7964,8 +7964,8 @@ bgp_show_table (struct vty *vty, struct bgp *bgp, struct bgp_table *table,
{
vty_outln (vty, "BGP table version is %" PRIu64 ", local router ID is %s", table->version,
inet_ntoa(bgp->router_id));
vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTY_NEWLINE);
vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE);
vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTYNL);
vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTYNL);
if (type == bgp_show_type_dampend_paths
|| type == bgp_show_type_damp_neighbor)
vty_outln (vty, BGP_SHOW_DAMP_HEADER);
Expand Down Expand Up @@ -8020,7 +8020,7 @@ bgp_show_table (struct vty *vty, struct bgp *bgp, struct bgp_table *table,
}
else
vty_outln (vty, "%sDisplayed %ld routes and %ld total paths",
VTY_NEWLINE, output_count, total_count);
VTYNL, output_count, total_count);
}

return CMD_SUCCESS;
Expand Down Expand Up @@ -8082,7 +8082,7 @@ bgp_show_all_instances_routes_vty (struct vty *vty, afi_t afi, safi_t safi,
else
{
vty_outln (vty, "%sInstance %s:",
VTY_NEWLINE,
VTYNL,
(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 @@ -9169,7 +9169,7 @@ bgp_table_stats (struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi)
thread_execute (bm->master, bgp_table_stats_walker, &ts, 0);

vty_outln (vty, "BGP %s RIB statistics%s",
afi_safi_print (afi, safi), VTY_NEWLINE);
afi_safi_print (afi, safi), VTYNL);

for (i = 0; i < BGP_STATS_MAX; i++)
{
Expand Down Expand Up @@ -9405,7 +9405,7 @@ bgp_peer_counts (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi, u_c

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

for (i = 0; i < PCOUNT_MAX; i++)
vty_outln (vty, "%20s: %-10d", pcount_strs[i], pcounts.count[i]);
Expand Down Expand Up @@ -9633,11 +9633,11 @@ show_adj_route (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi,
{
vty_outln (vty, "BGP table version is %" PRIu64 ", local router ID is %s", table->version,
inet_ntoa(bgp->router_id));
vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTY_NEWLINE);
vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE);
vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTYNL);
vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTYNL);

vty_outln (vty, "Originating default network 0.0.0.0%s",
VTY_NEWLINE);
VTYNL);
}
header1 = 0;
}
Expand All @@ -9664,8 +9664,8 @@ show_adj_route (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi,
{
vty_outln (vty, "BGP table version is 0, local router ID is %s",
inet_ntoa(bgp->router_id));
vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTY_NEWLINE);
vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE);
vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTYNL);
vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTYNL);
}
header1 = 0;
}
Expand Down Expand Up @@ -9708,8 +9708,8 @@ show_adj_route (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi,
{
vty_outln (vty, "BGP table version is %" PRIu64 ", local router ID is %s", table->version,
inet_ntoa(bgp->router_id));
vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTY_NEWLINE);
vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE);
vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTYNL);
vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTYNL);
}
header1 = 0;
}
Expand Down Expand Up @@ -9745,7 +9745,7 @@ show_adj_route (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi,
json_object_int_add(json, "totalPrefixCounter", output_count);
else
vty_outln (vty, "%sTotal number of prefixes %ld",
VTY_NEWLINE, output_count);
VTYNL, output_count);
}
if (use_json)
{
Expand Down
6 changes: 3 additions & 3 deletions bgpd/bgp_updgrp_adv.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ subgrp_show_adjq_vty (struct update_subgroup *subgrp, struct vty *vty,
vty_outln (vty,
"BGP table version is %" PRIu64 ", local router ID is %s",
table->version,inet_ntoa(bgp->router_id));
vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTY_NEWLINE);
vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE);
vty_outln (vty, BGP_SHOW_SCODE_HEADER, VTYNL);
vty_outln (vty, BGP_SHOW_OCODE_HEADER, VTYNL);
header1 = 0;
}
if (header2)
Expand All @@ -251,7 +251,7 @@ subgrp_show_adjq_vty (struct update_subgroup *subgrp, struct vty *vty,
}
if (output_count != 0)
vty_outln (vty, "%sTotal number of prefixes %ld",
VTY_NEWLINE, output_count);
VTYNL, output_count);
}

static int
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_vpn.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ show_adj_route_vpn (struct vty *vty, struct peer *peer, struct prefix_rd *prd,
vty_outln (vty,
"Status codes: s suppressed, d damped, h history, * valid, > best, i - internal");
vty_outln (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete%s",
VTY_NEWLINE);
VTYNL);
vty_outln (vty, V4_HEADER);
}
header = 0;
Expand Down
Loading

0 comments on commit 1318e7c

Please sign in to comment.