summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_mpls_vty.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-07-13 17:49:13 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-07-13 20:29:22 +0200
commit5c7571d43f57317b0827ac82fbebc4cdc6865be0 (patch)
tree2bc63ccbd805abc9689e9f3345e34871558d5c26 /zebra/zebra_mpls_vty.c
parentlib: move \n vs. \r\n handling into vty code (diff)
downloadfrr-5c7571d43f57317b0827ac82fbebc4cdc6865be0.tar.xz
frr-5c7571d43f57317b0827ac82fbebc4cdc6865be0.zip
*: ditch vty_outln(), part 1 of 2
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'zebra/zebra_mpls_vty.c')
-rw-r--r--zebra/zebra_mpls_vty.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/zebra/zebra_mpls_vty.c b/zebra/zebra_mpls_vty.c
index 6c2dbca3a..41e3aac9a 100644
--- a/zebra/zebra_mpls_vty.c
+++ b/zebra/zebra_mpls_vty.c
@@ -53,20 +53,20 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str,
if (!mpls_enabled)
{
- vty_outln (vty,"%% MPLS not turned on in kernel, ignoring command");
+ vty_out (vty,"%% MPLS not turned on in kernel, ignoring command\n");
return CMD_WARNING;
}
zvrf = vrf_info_lookup(VRF_DEFAULT);
if (!zvrf)
{
- vty_outln (vty, "%% Default VRF does not exist");
+ vty_out (vty, "%% Default VRF does not exist\n");
return CMD_WARNING;
}
if (!inlabel_str)
{
- vty_outln (vty, "%% No Label Information");
+ vty_out (vty, "%% No Label Information\n");
return CMD_WARNING;
}
@@ -74,7 +74,7 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str,
label = atoi(inlabel_str);
if (!IS_MPLS_UNRESERVED_LABEL(label))
{
- vty_outln (vty, "%% Invalid label");
+ vty_out (vty, "%% Invalid label\n");
return CMD_WARNING;
}
@@ -82,12 +82,12 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str,
{
if (!gate_str)
{
- vty_outln (vty, "%% No Nexthop Information");
+ vty_out (vty, "%% No Nexthop Information\n");
return CMD_WARNING;
}
if (!outlabel_str)
{
- vty_outln (vty, "%% No Outgoing label Information");
+ vty_out (vty, "%% No Outgoing label Information\n");
return CMD_WARNING;
}
}
@@ -108,7 +108,7 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str,
gtype = NEXTHOP_TYPE_IPV4;
else
{
- vty_outln (vty, "%% Invalid nexthop");
+ vty_out (vty, "%% Invalid nexthop\n");
return CMD_WARNING;
}
}
@@ -133,7 +133,7 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str,
if (!zebra_mpls_lsp_label_consistent (zvrf, in_label, out_label, gtype,
&gate, 0))
{
- vty_outln (vty,"%% Label value not consistent");
+ vty_out (vty,"%% Label value not consistent\n");
return CMD_WARNING;
}
#endif /* HAVE_CUMULUS */
@@ -146,7 +146,7 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str,
if (ret)
{
- vty_outln (vty, "%% LSP cannot be %s",
+ vty_out (vty, "%% LSP cannot be %s\n",
add_cmd ? "added" : "deleted");
return CMD_WARNING;
}
@@ -218,7 +218,7 @@ zebra_mpls_bind (struct vty *vty, int add_cmd, const char *prefix,
zvrf = vrf_info_lookup(VRF_DEFAULT);
if (!zvrf)
{
- vty_outln (vty, "%% Default VRF does not exist");
+ vty_out (vty, "%% Default VRF does not exist\n");
return CMD_WARNING;
}
@@ -226,7 +226,7 @@ zebra_mpls_bind (struct vty *vty, int add_cmd, const char *prefix,
ret = str2prefix(prefix, &p);
if (ret <= 0)
{
- vty_outln (vty, "%% Malformed address");
+ vty_out (vty, "%% Malformed address\n");
return CMD_WARNING;
}
@@ -234,7 +234,7 @@ zebra_mpls_bind (struct vty *vty, int add_cmd, const char *prefix,
{
if (!label_str)
{
- vty_outln (vty, "%% No label binding specified");
+ vty_out (vty, "%% No label binding specified\n");
return CMD_WARNING;
}
@@ -252,12 +252,12 @@ zebra_mpls_bind (struct vty *vty, int add_cmd, const char *prefix,
label = atoi(label_str);
if (!IS_MPLS_UNRESERVED_LABEL(label))
{
- vty_outln (vty, "%% Invalid label");
+ vty_out (vty, "%% Invalid label\n");
return CMD_WARNING;
}
if (zebra_mpls_label_already_bound (zvrf, label))
{
- vty_outln (vty,"%% Label already bound to a FEC");
+ vty_out (vty,"%% Label already bound to a FEC\n");
return CMD_WARNING;
}
}
@@ -269,7 +269,7 @@ zebra_mpls_bind (struct vty *vty, int add_cmd, const char *prefix,
if (ret)
{
- vty_outln (vty, "%% FEC to label binding cannot be %s",
+ vty_out (vty, "%% FEC to label binding cannot be %s\n",
add_cmd ? "added" : "deleted");
return CMD_WARNING;
}
@@ -874,7 +874,7 @@ DEFUN (show_mpls_fec,
ret = str2prefix(argv[3]->arg, &p);
if (ret <= 0)
{
- vty_outln (vty, "%% Malformed address");
+ vty_out (vty, "%% Malformed address\n");
return CMD_WARNING;
}
zebra_mpls_print_fec (vty, zvrf, &p);
@@ -925,7 +925,7 @@ DEFUN (show_mpls_status,
"MPLS information\n"
"MPLS status\n")
{
- vty_outln (vty, "MPLS support enabled: %s",
+ vty_out (vty, "MPLS support enabled: %s\n",
(mpls_enabled) ? "yes" : "no (mpls kernel extensions not detected)");
return CMD_SUCCESS;
}
@@ -942,7 +942,7 @@ zebra_mpls_global_block (struct vty *vty, int add_cmd,
zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
if (!zvrf)
{
- vty_outln (vty, "%% Default VRF does not exist");
+ vty_out (vty, "%% Default VRF does not exist\n");
return CMD_WARNING;
}
@@ -950,7 +950,7 @@ zebra_mpls_global_block (struct vty *vty, int add_cmd,
{
if (!start_label_str || !end_label_str)
{
- vty_outln (vty, "%% Labels not specified");
+ vty_out (vty, "%% Labels not specified\n");
return CMD_WARNING;
}
@@ -959,12 +959,12 @@ zebra_mpls_global_block (struct vty *vty, int add_cmd,
if (!IS_MPLS_UNRESERVED_LABEL(start_label) ||
!IS_MPLS_UNRESERVED_LABEL(end_label))
{
- vty_outln (vty, "%% Invalid label");
+ vty_out (vty, "%% Invalid label\n");
return CMD_WARNING;
}
if (end_label < start_label)
{
- vty_outln (vty,"%% End label is less than Start label");
+ vty_out (vty,"%% End label is less than Start label\n");
return CMD_WARNING;
}
@@ -975,7 +975,7 @@ zebra_mpls_global_block (struct vty *vty, int add_cmd,
if (ret)
{
- vty_outln (vty, "%% Global label block could not be %s",
+ vty_out (vty, "%% Global label block could not be %s\n",
add_cmd ? "added" : "deleted");
return CMD_WARNING;
}