diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2017-07-13 17:49:13 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2017-07-13 20:29:22 +0200 |
commit | 5c7571d43f57317b0827ac82fbebc4cdc6865be0 (patch) | |
tree | 2bc63ccbd805abc9689e9f3345e34871558d5c26 /zebra/zebra_mpls.c | |
parent | lib: move \n vs. \r\n handling into vty code (diff) | |
download | frr-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.c')
-rw-r--r-- | zebra/zebra_mpls.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c index 510d79693..d78c1629b 100644 --- a/zebra/zebra_mpls.c +++ b/zebra/zebra_mpls.c @@ -530,7 +530,7 @@ fec_print (zebra_fec_t *fec, struct vty *vty) rn = fec->rn; prefix2str(&rn->p, buf, BUFSIZ); - vty_outln (vty, "%s", buf); + vty_out (vty, "%s\n", buf); vty_out(vty, " Label: %s", label2str(fec->label, buf, BUFSIZ)); if (fec->label_index != MPLS_INVALID_LABEL_INDEX) vty_out(vty, ", Label Index: %u", fec->label_index); @@ -1398,7 +1398,7 @@ nhlfe_print (zebra_nhlfe_t *nhlfe, struct vty *vty) if (!nexthop || !nexthop->nh_label) // unexpected return; - vty_outln (vty, " type: %s remote label: %s distance: %d", + vty_out (vty, " type: %s remote label: %s distance: %d\n", nhlfe_type2str(nhlfe->type), label2str(nexthop->nh_label->label[0], buf, BUFSIZ), nhlfe->distance); @@ -1436,7 +1436,7 @@ lsp_print (zebra_lsp_t *lsp, void *ctxt) vty = (struct vty *) ctxt; - vty_outln (vty, "Local label: %u%s", + vty_out (vty, "Local label: %u%s\n", lsp->ile.in_label, CHECK_FLAG(lsp->flags, LSP_FLAG_INSTALLED) ? " (installed)" : ""); @@ -2238,7 +2238,7 @@ zebra_mpls_write_fec_config (struct vty *vty, struct zebra_vrf *zvrf) write = 1; prefix2str(&rn->p, buf, BUFSIZ); - vty_outln (vty, "mpls label bind %s %s", buf, + vty_out (vty, "mpls label bind %s %s\n", buf, label2str(fec->label, lstr, BUFSIZ)); } } @@ -2809,7 +2809,7 @@ zebra_mpls_print_lsp (struct vty *vty, struct zebra_vrf *zvrf, mpls_label_t labe if (use_json) { json = lsp_json(lsp); - vty_outln (vty, "%s", + vty_out (vty, "%s\n", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } @@ -2840,15 +2840,15 @@ zebra_mpls_print_lsp_table (struct vty *vty, struct zebra_vrf *zvrf, json_object_object_add(json, label2str(lsp->ile.in_label, buf, BUFSIZ), lsp_json(lsp)); - vty_outln (vty, "%s", + vty_out (vty, "%s\n", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } else { - vty_outln (vty, " Inbound Outbound"); - vty_outln (vty, " Label Type Nexthop Label"); - vty_outln (vty, "-------- ------- --------------- --------"); + vty_out (vty, " Inbound Outbound\n"); + vty_out (vty, " Label Type Nexthop Label\n"); + vty_out (vty, "-------- ------- --------------- --------\n"); for (ALL_LIST_ELEMENTS_RO(lsp_list, node, lsp)) { @@ -2871,7 +2871,7 @@ zebra_mpls_print_lsp_table (struct vty *vty, struct zebra_vrf *zvrf, break; } - vty_outln (vty, " %8d", nexthop->nh_label->label[0]); + vty_out (vty, " %8d\n", nexthop->nh_label->label[0]); } } @@ -2913,7 +2913,7 @@ zebra_mpls_write_lsp_config (struct vty *vty, struct zebra_vrf *zvrf) break; } - vty_outln (vty, "mpls lsp %u %s %s", + vty_out (vty, "mpls lsp %u %s %s\n", slsp->ile.in_label, buf, lstr); } } @@ -2963,7 +2963,7 @@ zebra_mpls_write_label_block_config (struct vty *vty, struct zebra_vrf *zvrf) if ((zvrf->mpls_srgb.start_label != MPLS_DEFAULT_MIN_SRGB_LABEL) || (zvrf->mpls_srgb.end_label != MPLS_DEFAULT_MAX_SRGB_LABEL)) { - vty_outln (vty, "mpls label global-block %u %u", + vty_out (vty, "mpls label global-block %u %u\n", zvrf->mpls_srgb.start_label,zvrf->mpls_srgb.end_label); } |