diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-06-21 03:10:57 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-06-29 17:31:28 +0000 |
| commit | 96ade3ed7716c89b8047a1c0ab3377985d461cf8 (patch) | |
| tree | 1c3061738c2c0027612b6cdb3e5d5eccb08587bf /ospf6d | |
| parent | 4d5f445750e01467898eee47796e80d808500d56 (diff) | |
*: use vty_outln
Saves 400 lines
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'ospf6d')
| -rw-r--r-- | ospf6d/ospf6_area.c | 16 | ||||
| -rw-r--r-- | ospf6d/ospf6_bfd.c | 6 | ||||
| -rw-r--r-- | ospf6d/ospf6_interface.c | 2 | ||||
| -rw-r--r-- | ospf6d/ospf6_spf.c | 4 | ||||
| -rw-r--r-- | ospf6d/ospf6_top.c | 27 | ||||
| -rw-r--r-- | ospf6d/ospf6_zebra.c | 6 |
6 files changed, 28 insertions, 33 deletions
diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index a4996018ac..826a66ccc6 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -396,18 +396,18 @@ ospf6_area_show (struct vty *vty, struct ospf6_area *oa) result = monotime_since(&oa->ts_spf, NULL); if (result/TIMER_SECOND_MICRO > 0) { - vty_out (vty, "SPF last executed %ld.%lds ago%s", + vty_outln (vty, "SPF last executed %ld.%lds ago", result/TIMER_SECOND_MICRO, - result%TIMER_SECOND_MICRO, VTY_NEWLINE); + result % TIMER_SECOND_MICRO); } else { - vty_out (vty, "SPF last executed %ldus ago%s", - result, VTY_NEWLINE); + vty_outln (vty, "SPF last executed %ldus ago", + result); } } else - vty_out (vty, "SPF has not been run%s", VTY_NEWLINE); + vty_outln (vty, "SPF has not been run"); } @@ -968,8 +968,7 @@ DEFUN (ospf6_area_stub, if (!ospf6_area_stub_set (ospf6, area)) { - vty_out (vty, "First deconfigure all virtual link through this area%s", - VTY_NEWLINE); + vty_outln (vty,"First deconfigure all virtual link through this area"); return CMD_WARNING; } @@ -994,8 +993,7 @@ DEFUN (ospf6_area_stub_no_summary, if (!ospf6_area_stub_set (ospf6, area)) { - vty_out (vty, "First deconfigure all virtual link through this area%s", - VTY_NEWLINE); + vty_outln (vty,"First deconfigure all virtual link through this area"); return CMD_WARNING; } diff --git a/ospf6d/ospf6_bfd.c b/ospf6d/ospf6_bfd.c index 7d9abe2331..6ca56869d5 100644 --- a/ospf6d/ospf6_bfd.c +++ b/ospf6d/ospf6_bfd.c @@ -295,11 +295,11 @@ ospf6_bfd_write_config(struct vty *vty, struct ospf6_interface *oi) bfd_info = (struct bfd_info *)oi->bfd_info; if (CHECK_FLAG(bfd_info->flags, BFD_FLAG_PARAM_CFG)) - vty_out (vty, " ipv6 ospf6 bfd %d %d %d%s", + vty_outln (vty, " ipv6 ospf6 bfd %d %d %d", bfd_info->detect_mult, bfd_info->required_min_rx, - bfd_info->desired_min_tx, VTY_NEWLINE); + bfd_info->desired_min_tx); else - vty_out (vty, " ipv6 ospf6 bfd%s", VTY_NEWLINE); + vty_outln (vty, " ipv6 ospf6 bfd"); } /* diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index 991eb318d7..e50de6fab2 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -1307,7 +1307,7 @@ DEFUN (auto_cost_reference_bandwidth, refbw = strtol (argv[idx_number]->arg, NULL, 10); if (refbw < 1 || refbw > 4294967) { - vty_out (vty, "reference-bandwidth value is invalid%s", VTY_NEWLINE); + vty_outln (vty, "reference-bandwidth value is invalid"); return CMD_WARNING; } diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c index c8c495dca2..0b8a5e4767 100644 --- a/ospf6d/ospf6_spf.c +++ b/ospf6d/ospf6_spf.c @@ -929,9 +929,9 @@ ospf6_spf_config_write (struct vty *vty) if (ospf6->spf_delay != OSPF_SPF_DELAY_DEFAULT || ospf6->spf_holdtime != OSPF_SPF_HOLDTIME_DEFAULT || ospf6->spf_max_holdtime != OSPF_SPF_MAX_HOLDTIME_DEFAULT) - vty_out (vty, " timers throttle spf %d %d %d%s", + vty_outln (vty, " timers throttle spf %d %d %d", ospf6->spf_delay, ospf6->spf_holdtime, - ospf6->spf_max_holdtime, VTY_NEWLINE); + ospf6->spf_max_holdtime); } diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index c0794d8638..b1a9cb05eb 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -813,8 +813,7 @@ ospf6_show (struct vty *vty, struct ospf6 *o) /* Redistribute configuration */ /* XXX */ - vty_out (vty, " LSA minimum arrival %d msecs%s", o->lsa_minarrival, - VTY_NEWLINE); + vty_outln (vty, " LSA minimum arrival %d msecs",o->lsa_minarrival); /* Show SPF parameters */ vty_out(vty, " Initial SPF scheduling delay %d millisec(s)%s" @@ -857,12 +856,12 @@ ospf6_show (struct vty *vty, struct ospf6 *o) if (CHECK_FLAG(o->config_flags, OSPF6_LOG_ADJACENCY_CHANGES)) { if (CHECK_FLAG(o->config_flags, OSPF6_LOG_ADJACENCY_DETAIL)) - vty_out(vty, " All adjacency changes are logged%s",VTY_NEWLINE); + vty_outln (vty, " All adjacency changes are logged"); else - vty_out(vty, " Adjacency changes are logged%s",VTY_NEWLINE); + vty_outln (vty, " Adjacency changes are logged"); } - vty_out (vty, "%s",VTY_NEWLINE); + vty_outln (vty, ""); for (ALL_LIST_ELEMENTS_RO (o->area_list, n, oa)) ospf6_area_show (vty, oa); @@ -978,7 +977,7 @@ ospf6_distance_config_write (struct vty *vty) struct ospf6_distance *odistance; if (ospf6->distance_all) - vty_out (vty, " distance %u%s", ospf6->distance_all, VTY_NEWLINE); + vty_outln (vty, " distance %u", ospf6->distance_all); if (ospf6->distance_intra || ospf6->distance_inter @@ -993,7 +992,7 @@ ospf6_distance_config_write (struct vty *vty) if (ospf6->distance_external) vty_out (vty, " external %u", ospf6->distance_external); - vty_out (vty, "%s", VTY_NEWLINE); + vty_outln (vty, ""); } for (rn = route_top (ospf6->distance_table); rn; rn = route_next (rn)) @@ -1001,10 +1000,9 @@ ospf6_distance_config_write (struct vty *vty) { char buf[PREFIX_STRLEN]; - vty_out (vty, " distance %u %s %s%s", odistance->distance, + vty_outln (vty, " distance %u %s %s", odistance->distance, prefix2str (&rn->p, buf, sizeof (buf)), - odistance->access_list ? odistance->access_list : "", - VTY_NEWLINE); + odistance->access_list ? odistance->access_list : ""); } return 0; } @@ -1031,13 +1029,13 @@ config_write_ospf6 (struct vty *vty) if (CHECK_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_CHANGES)) { if (CHECK_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_DETAIL)) - vty_out(vty, " log-adjacency-changes detail%s", VTY_NEWLINE); + vty_outln (vty, " log-adjacency-changes detail"); else if (!DFLT_OSPF6_LOG_ADJACENCY_CHANGES) - vty_out(vty, " log-adjacency-changes%s", VTY_NEWLINE); + vty_outln (vty, " log-adjacency-changes"); } else if (DFLT_OSPF6_LOG_ADJACENCY_CHANGES) { - vty_out(vty, " no log-adjacency-changes%s", VTY_NEWLINE); + vty_outln (vty, " no log-adjacency-changes"); } if (ospf6->ref_bandwidth != OSPF6_REFERENCE_BANDWIDTH) @@ -1046,8 +1044,7 @@ config_write_ospf6 (struct vty *vty) /* LSA timers print. */ if (ospf6->lsa_minarrival != OSPF_MIN_LS_ARRIVAL) - vty_out (vty, " timers lsa min-arrival %d%s", ospf6->lsa_minarrival, - VTY_NEWLINE); + vty_outln (vty, " timers lsa min-arrival %d",ospf6->lsa_minarrival); ospf6_stub_router_config_write (vty); ospf6_redistribute_config_write (vty); diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c index 305870a64f..ea36ceabdf 100644 --- a/ospf6d/ospf6_zebra.c +++ b/ospf6d/ospf6_zebra.c @@ -683,7 +683,7 @@ ospf6_distance_set (struct vty *vty, struct ospf6 *o, ret = str2prefix_ipv6 (ip_str, &p); if (ret == 0) { - vty_out (vty, "Malformed prefix%s", VTY_NEWLINE); + vty_outln (vty, "Malformed prefix"); return CMD_WARNING; } @@ -731,14 +731,14 @@ ospf6_distance_unset (struct vty *vty, struct ospf6 *o, ret = str2prefix_ipv6 (ip_str, &p); if (ret == 0) { - vty_out (vty, "Malformed prefix%s", VTY_NEWLINE); + vty_outln (vty, "Malformed prefix"); return CMD_WARNING; } rn = route_node_lookup (o->distance_table, (struct prefix *) &p); if (!rn) { - vty_out (vty, "Cant't find specified prefix%s", VTY_NEWLINE); + vty_outln (vty, "Cant't find specified prefix"); return CMD_WARNING; } |
