From 8e25c8ce2ff6718d3c1d6cb5b6df6409147570d6 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Wed, 28 Jun 2017 16:30:14 +0000 Subject: [PATCH] *: rebase vty_outln() -> master Signed-off-by: Quentin Young --- bgpd/bgp_vty.c | 2 +- lib/routemap.c | 12 ++++++------ ospfd/ospf_vty.c | 5 ++--- python/clidef.py | 4 ++-- tests/lib/cli/test_cli.c | 8 ++++---- 5 files changed, 15 insertions(+), 16 deletions(-) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 96e0b63d6b..6e998085c1 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -1009,7 +1009,7 @@ DEFPY (no_bgp_router_id, { if (! IPV4_ADDR_SAME (&bgp->router_id_static, &router_id)) { - vty_outln (vty, "%% BGP router-id doesn't match%s"); + vty_outln (vty, "%% BGP router-id doesn't match"); return CMD_WARNING; } } diff --git a/lib/routemap.c b/lib/routemap.c index fa6f2691de..9eb28888ad 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -568,11 +568,11 @@ generic_match_delete (struct vty *vty, struct route_map_index *index, switch (ret) { case RMAP_RULE_MISSING: - vty_outln (vty, "%% [%s] Can't find rule.%s", frr_protonameinst); + vty_outln (vty, "%% [%s] Can't find rule.", frr_protonameinst); break; case RMAP_COMPILE_ERROR: - vty_out (vty, "%% [%s] Argument form is unsupported or malformed.%s", - frr_protonameinst, VTY_NEWLINE); + vty_outln (vty, "%% [%s] Argument form is unsupported or malformed.", + frr_protonameinst); break; } if (dep_name) @@ -605,7 +605,7 @@ generic_set_add (struct vty *vty, struct route_map_index *index, switch (ret) { case RMAP_RULE_MISSING: - vty_outln (vty, "%% [%s] Can't find rule.%s", frr_protonameinst); + vty_outln (vty, "%% [%s] Can't find rule.", frr_protonameinst); return CMD_WARNING; case RMAP_COMPILE_ERROR: vty_outln (vty, "%% [%s] Argument form is unsupported or malformed.", @@ -628,10 +628,10 @@ generic_set_delete (struct vty *vty, struct route_map_index *index, switch (ret) { case RMAP_RULE_MISSING: - vty_outln (vty, "%% [%s] Can't find rule.%s", frr_protonameinst); + vty_outln (vty, "%% [%s] Can't find rule.", frr_protonameinst); return CMD_WARNING; case RMAP_COMPILE_ERROR: - vty_outln (vty, "%% [%s] Argument form is unsupported or malformed.%s", + vty_outln (vty, "%% [%s] Argument form is unsupported or malformed.", frr_protonameinst); return CMD_WARNING; } diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 05a5961385..b136a752f2 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -3270,7 +3270,7 @@ show_ip_ospf_interface_sub (struct vty *vty, struct ospf *ospf, struct interface vty_outln (vty, "%s is %s", ifp->name, ((is_up = if_is_operative(ifp)) ? "up" : "down")); vty_outln (vty, " ifindex %u, MTU %u bytes, BW %u Mbit %s", - ifp->ifindex, ifp->mtu, bandwidth, if_flag_dump(ifp->flags)) + ifp->ifindex, ifp->mtu, bandwidth, if_flag_dump(ifp->flags)); } /* Is interface OSPF enabled? */ @@ -7025,8 +7025,7 @@ DEFUN (ip_ospf_area, if (OSPF_IF_PARAM_CONFIGURED(params, if_area)) { vty_out (vty, - "Must remove previous area/address config before changing ospf area %s", - VTY_NEWLINE); + "Must remove previous area/address config before changing ospf area"); return CMD_WARNING; } ospf_if_update_params ((ifp), (addr)); diff --git a/python/clidef.py b/python/clidef.py index de3a764a0b..1bf3c24aa2 100644 --- a/python/clidef.py +++ b/python/clidef.py @@ -142,8 +142,8 @@ $argdecls continue; _fail = 0;$argblocks if (_fail) - vty_out (vty, "%% invalid input for %s: %s%s", - argv[_i]->varname, argv[_i]->arg, VTY_NEWLINE); + vty_outln (vty, "%% invalid input for %s: %s", + argv[_i]->varname, argv[_i]->arg); _failcnt += _fail; } if (_failcnt) diff --git a/tests/lib/cli/test_cli.c b/tests/lib/cli/test_cli.c index 2a68ba3826..43366d49e2 100644 --- a/tests/lib/cli/test_cli.c +++ b/tests/lib/cli/test_cli.c @@ -47,10 +47,10 @@ DEFPY(magic_test, magic_test_cmd, "1\n2\n3\n4\n5\n") { char buf[256]; - vty_out(vty, "def: %s%s", self->string, VTY_NEWLINE); - vty_out(vty, "num: %ld%s", magic, VTY_NEWLINE); - vty_out(vty, "ipv4: %s%s", prefix2str(ipv4net, buf, sizeof(buf)), VTY_NEWLINE); - vty_out(vty, "ipv6: %s%s", inet_ntop(AF_INET6, &ipv6, buf, sizeof(buf)), VTY_NEWLINE); + vty_outln(vty, "def: %s", self->string); + vty_outln(vty, "num: %ld", magic); + vty_outln(vty, "ipv4: %s", prefix2str(ipv4net, buf, sizeof(buf))); + vty_outln(vty, "ipv6: %s", inet_ntop(AF_INET6, &ipv6, buf, sizeof(buf))); return CMD_SUCCESS; } -- 2.39.5