Skip to content

Commit

Permalink
*: remove VTYNL, part 1 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 6b18e3b commit 6d3c2ed
Show file tree
Hide file tree
Showing 50 changed files with 219 additions and 219 deletions.
4 changes: 2 additions & 2 deletions bgpd/bgp_damp.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ bgp_damp_info_vty (struct vty *vty, struct bgp_info *binfo,
vty_out (vty, ", reuse in %s",
bgp_get_reuse_time (penalty, timebuf, BGP_UPTIME_LEN, 0, json_path));

vty_out (vty, VTYNL);
vty_out (vty, "\n");
}
}

Expand Down Expand Up @@ -707,7 +707,7 @@ bgp_show_dampening_parameters (struct vty *vty, afi_t afi, safi_t safi)
(long long)damp->max_suppress_time / 60);
vty_out (vty, "Max supress penalty: %u\n",
damp->ceiling);
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}
else
vty_out (vty, "dampening not enabled for %s\n",
Expand Down
4 changes: 2 additions & 2 deletions bgpd/bgp_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ bgp_debug_list_print (struct vty *vty, const char *desc, struct list *list)
}
}

vty_out (vty, VTYNL);
vty_out (vty, "\n");
}

/* Print the command to enable the debug for each peer/prefix this debug is
Expand Down Expand Up @@ -1747,7 +1747,7 @@ DEFUN (show_debugging_bgp,

if (BGP_DEBUG (allow_martians, ALLOW_MARTIANS))
vty_out (vty, " BGP allow martian next hop debugging is on\n");
vty_out (vty, VTYNL);
vty_out (vty, "\n");
return CMD_SUCCESS;
}

Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ DEFUN (no_ip_as_path,

if (asfilter == NULL)
{
vty_out (vty, VTYNL);
vty_out (vty, "\n");
return CMD_WARNING;
}

Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_mplsvpn.c
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ bgp_show_mpls_vpn (struct vty *vty, afi_t afi, struct prefix_rd *prd,
rd_vnc_eth.macaddr.octet[4],
rd_vnc_eth.macaddr.octet[5]);
#endif
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}
rd_header = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_nexthop.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ bgp_show_nexthops (struct vty *vty, struct bgp *bgp, int detail)
}
tbuf = time(NULL) - (bgp_clock() - bnc->last_update);
vty_out (vty, " Last update: %s", ctime(&tbuf));
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_open.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ bgp_capability_vty_out (struct vty *vty, struct peer *peer, u_char use_json, jso
vty_out (vty, "SAFI Unknown %d ", mpc.safi);
break;
}
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}
}
else if (hdr->code >= 128)
Expand Down
36 changes: 18 additions & 18 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -6526,7 +6526,7 @@ route_vty_out (struct vty *vty, struct prefix *p,
}
else
{
vty_out (vty, VTYNL);
vty_out (vty, "\n");
#if ENABLE_BGP_VNC
/* prints an additional line, indented, with VNC info, if present */
if ((safi == SAFI_MPLS_VPN) || (safi == SAFI_ENCAP))
Expand Down Expand Up @@ -6663,7 +6663,7 @@ route_vty_out_tmp (struct vty *vty, struct prefix *p, struct attr *attr, safi_t
json_object_object_add(json_ar, inet_ntop (p->family, &p->u.prefix, buf_cut, BUFSIZ), json_net);
}
else
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}

void
Expand Down Expand Up @@ -6767,7 +6767,7 @@ route_vty_out_tag (struct vty *vty, struct prefix *p,
else
{
vty_out (vty, "notag/%d", label);
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}
}
}
Expand Down Expand Up @@ -6855,7 +6855,7 @@ route_vty_out_overlay (struct vty *vty, struct prefix *p,
}
}
}
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}

/* dampening route */
Expand Down Expand Up @@ -6919,7 +6919,7 @@ damp_route_vty_out (struct vty *vty, struct prefix *p, struct bgp_info *binfo,
vty_out (vty, "%s", bgp_origin_str[attr->origin]);
}
if (!use_json)
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}

/* flap route */
Expand Down Expand Up @@ -7019,7 +7019,7 @@ flap_route_vty_out (struct vty *vty, struct prefix *p, struct bgp_info *binfo,
vty_out (vty, "%s", bgp_origin_str[attr->origin]);
}
if (!use_json)
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}

static void
Expand Down Expand Up @@ -7193,7 +7193,7 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p,
}

if (!json_paths)
vty_out (vty, VTYNL);
vty_out (vty, "\n");

/* Line2 display Next-hop, Neighbor, Router-id */
/* Display the nexthop */
Expand Down Expand Up @@ -7343,7 +7343,7 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p,
}

if (!json_paths)
vty_out (vty, VTYNL);
vty_out (vty, "\n");

/* display the link-local nexthop */
if (attr->extra && attr->extra->mp_nexthop_len == BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL)
Expand Down Expand Up @@ -7562,7 +7562,7 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p,
json_object_object_add(json_path, "bestpath", json_bestpath);

if (!json_paths)
vty_out (vty, VTYNL);
vty_out (vty, "\n");

/* Line 4 display Community */
if (attr->community)
Expand Down Expand Up @@ -7649,7 +7649,7 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p,
}

if (!json_paths)
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}

if (binfo->extra && binfo->extra->damp_info)
Expand Down Expand Up @@ -7724,7 +7724,7 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p,
{
if (!first)
{
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}
}
}
Expand Down Expand Up @@ -7764,7 +7764,7 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p,
json_object_array_add(json_paths, json_path);
}
else
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}

#define BGP_SHOW_HEADER_CSV "Flags, Network, Next Hop, Metric, LocPrf, Weight, Path"
Expand Down Expand Up @@ -8249,7 +8249,7 @@ route_vty_out_detail_header (struct vty *vty, struct bgp *bgp,
{
if (first)
vty_out (vty, " Not advertised to any peer");
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}
}
}
Expand Down Expand Up @@ -9245,7 +9245,7 @@ bgp_table_stats (struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi)
vty_out (vty, "%12llu", ts.counts[i]);
}

vty_out (vty, VTYNL);
vty_out (vty, "\n");
}
return CMD_SUCCESS;
}
Expand Down Expand Up @@ -10672,7 +10672,7 @@ bgp_config_write_network_vpn (struct vty *vty, struct bgp *bgp,
if (bgp_static->backdoor)
vty_out (vty, " backdoor");
}
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}
return 0;
}
Expand Down Expand Up @@ -10719,7 +10719,7 @@ bgp_config_write_network_evpn (struct vty *vty, struct bgp *bgp,
vty_out (vty, " network %s rd %s ethtag %u tag %u esi %s gwip %s routermac %s",
buf, rdbuf, p->u.prefix_evpn.eth_tag,
decode_label (&bgp_static->label), esi, buf2 , macrouter);
vty_out (vty, VTYNL);
vty_out (vty, "\n");
if (macrouter)
XFREE (MTYPE_TMP, macrouter);
if (esi)
Expand Down Expand Up @@ -10794,7 +10794,7 @@ bgp_config_write_network (struct vty *vty, struct bgp *bgp,
vty_out (vty, " backdoor");
}

vty_out (vty, VTYNL);
vty_out (vty, "\n");
}

/* Aggregate-address configuration. */
Expand Down Expand Up @@ -10828,7 +10828,7 @@ bgp_config_write_network (struct vty *vty, struct bgp *bgp,
if (bgp_aggregate->summary_only)
vty_out (vty, " summary-only");

vty_out (vty, VTYNL);
vty_out (vty, "\n");
}

return 0;
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_updgrp.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ update_group_show_walkcb (struct update_group *updgrp, void *arg)
{
if (ctx->subgrp_id && (ctx->subgrp_id != subgrp->id))
continue;
vty_out (vty, VTYNL);
vty_out (vty, "\n");
vty_out (vty, " Update-subgroup %" PRIu64 ":\n", subgrp->id);
vty_out (vty, " Created: %s", timestamp_string (subgrp->uptime));

Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_vpn.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ show_adj_route_vpn (struct vty *vty, struct peer *peer, struct prefix_rd *prd,
rd_vnc_eth.macaddr.octet[5]);
#endif

vty_out (vty, VTYNL);
vty_out (vty, "\n");
}
rd_header = 0;
}
Expand Down
20 changes: 10 additions & 10 deletions bgpd/bgpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -6626,7 +6626,7 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,
if_ras_printed = TRUE;
}

vty_out (vty, VTYNL);
vty_out (vty, "\n");
}

/* remote-as and peer-group */
Expand Down Expand Up @@ -7016,7 +7016,7 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
vty_out (vty, " send");
else
vty_out (vty, " receive");
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}

/* Route reflector client. */
Expand Down Expand Up @@ -7163,7 +7163,7 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
" neighbor %s default-originate", addr);
if (peer->default_rmap[afi][safi].name)
vty_out (vty, " route-map %s", peer->default_rmap[afi][safi].name);
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}

/* Soft reconfiguration inbound. */
Expand Down Expand Up @@ -7191,7 +7191,7 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
vty_out (vty, " warning-only");
if (peer->pmax_restart[afi][safi])
vty_out (vty, " restart %u", peer->pmax_restart[afi][safi]);
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}

/* Route server client. */
Expand Down Expand Up @@ -7329,7 +7329,7 @@ bgp_config_write_family_header (struct vty *vty, afi_t afi, safi_t safi,
if (safi == SAFI_EVPN)
vty_out (vty, "l2vpn evpn");
}
vty_out (vty, VTYNL);
vty_out (vty, "\n");

*write = 1;
}
Expand Down Expand Up @@ -7416,7 +7416,7 @@ bgp_config_write (struct vty *vty)
(bgp->inst_type == BGP_INSTANCE_TYPE_VIEW) ?
"view" : "vrf", bgp->name);
}
vty_out (vty, VTYNL);
vty_out (vty, "\n");

/* No Synchronization */
if (bgp_option_check (BGP_OPT_CONFIG_CISCO))
Expand Down Expand Up @@ -7487,7 +7487,7 @@ bgp_config_write (struct vty *vty)
for (i = 0; i < bgp->confed_peers_cnt; i++)
vty_out(vty, " %u", bgp->confed_peers[i]);

vty_out (vty, VTYNL);
vty_out (vty, "\n");
}

/* BGP enforce-first-as. */
Expand All @@ -7508,14 +7508,14 @@ bgp_config_write (struct vty *vty)
vty_out (vty, " bgp max-med on-startup %u", bgp->v_maxmed_onstartup);
if (bgp->maxmed_onstartup_value != BGP_MAXMED_VALUE_DEFAULT)
vty_out (vty, " %u", bgp->maxmed_onstartup_value);
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}
if (bgp->v_maxmed_admin != BGP_MAXMED_ADMIN_UNCONFIGURED)
{
vty_out (vty, " bgp max-med administrative");
if (bgp->maxmed_admin_value != BGP_MAXMED_VALUE_DEFAULT)
vty_out (vty, " %u", bgp->maxmed_admin_value);
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}

/* write quanta */
Expand Down Expand Up @@ -7570,7 +7570,7 @@ bgp_config_write (struct vty *vty)
vty_out (vty, " confed");
if (bgp_flag_check (bgp, BGP_FLAG_MED_MISSING_AS_WORST))
vty_out (vty, " missing-as-worst");
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}

/* BGP network import check. */
Expand Down
10 changes: 5 additions & 5 deletions bgpd/rfapi/bgp_rfapi_cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2620,7 +2620,7 @@ bgp_rfapi_delete_nve_group (
vty_out (vty, " un=");
rfapiPrintRfapiIpAddr (vty, &rfd->un_addr);
if (vty)
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}
list_delete (orphaned_nves);
}
Expand Down Expand Up @@ -4459,7 +4459,7 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)
{
vty_out (vty, "%hu ", (uint16_t) ((uintptr_t) data));
}
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}

if (rfg->rt_import_list && rfg->rt_export_list &&
Expand Down Expand Up @@ -4546,7 +4546,7 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)
vty_out (vty, "%d", hc->default_response_lifetime);
else
vty_out (vty, "infinite");
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}
if (hc->default_rt_import_list && hc->default_rt_export_list &&
ecommunity_cmp (hc->default_rt_import_list,
Expand Down Expand Up @@ -4661,7 +4661,7 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp)
vty_out (vty, "%d", rfg->response_lifetime);
else
vty_out (vty, "infinite");
vty_out (vty, VTYNL);
vty_out (vty, "\n");
}

if (rfg->rt_import_list && rfg->rt_export_list &&
Expand Down Expand Up @@ -5031,7 +5031,7 @@ bgp_rfapi_show_summary (struct bgp *bgp, struct vty *vty)
(hc->rfp_cfg.ftd_advertisement_interval == RFAPI_RFP_CFG_DEFAULT_FTD_ADVERTISEMENT_INTERVAL ? "(default)" : ""));
vty_out (vty, "%-39s %d seconds\n", "Default RFP response lifetime:",
hc->default_response_lifetime);
vty_out (vty, VTYNL);
vty_out (vty, "\n");
return;
}

Expand Down
Loading

0 comments on commit 6d3c2ed

Please sign in to comment.