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 /lib/distribute.c | |
| parent | 4d5f445750e01467898eee47796e80d808500d56 (diff) | |
*: use vty_outln
Saves 400 lines
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/distribute.c')
| -rw-r--r-- | lib/distribute.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/lib/distribute.c b/lib/distribute.c index 7b7d49d1d6..a935e84ad6 100644 --- a/lib/distribute.c +++ b/lib/distribute.c @@ -349,7 +349,7 @@ DEFUN (no_distribute_list, if (! ret) { - vty_out (vty, "distribute list doesn't exist%s", VTY_NEWLINE); + vty_outln (vty, "distribute list doesn't exist"); return CMD_WARNING; } return CMD_SUCCESS; @@ -393,9 +393,9 @@ config_show_distribute (struct vty *vty) DISTRIBUTE_V6_OUT, has_print); } if (has_print) - vty_out (vty, "%s", VTY_NEWLINE); + vty_outln (vty, ""); else - vty_out (vty, " not set%s", VTY_NEWLINE); + vty_outln (vty, " not set"); for (i = 0; i < disthash->size; i++) for (mp = disthash->index[i]; mp; mp = mp->next) @@ -414,9 +414,9 @@ config_show_distribute (struct vty *vty) has_print = distribute_print(vty, dist->prefix, 1, DISTRIBUTE_V6_OUT, has_print); if (has_print) - vty_out (vty, "%s", VTY_NEWLINE); + vty_outln (vty, ""); else - vty_out(vty, " nothing%s", VTY_NEWLINE); + vty_outln (vty, " nothing"); } } @@ -437,9 +437,9 @@ config_show_distribute (struct vty *vty) DISTRIBUTE_V6_IN, has_print); } if (has_print) - vty_out (vty, "%s", VTY_NEWLINE); + vty_outln (vty, ""); else - vty_out (vty, " not set%s", VTY_NEWLINE); + vty_outln (vty, " not set"); for (i = 0; i < disthash->size; i++) for (mp = disthash->index[i]; mp; mp = mp->next) @@ -458,9 +458,9 @@ config_show_distribute (struct vty *vty) has_print = distribute_print(vty, dist->prefix, 1, DISTRIBUTE_V6_IN, has_print); if (has_print) - vty_out (vty, "%s", VTY_NEWLINE); + vty_outln (vty, ""); else - vty_out(vty, " nothing%s", VTY_NEWLINE); + vty_outln (vty, " nothing"); } } return 0; @@ -487,12 +487,11 @@ config_write_distribute (struct vty *vty) if (dist->list[j]) { output = j == DISTRIBUTE_V4_OUT || j == DISTRIBUTE_V6_OUT; v6 = j == DISTRIBUTE_V6_IN || j == DISTRIBUTE_V6_OUT; - vty_out (vty, " %sdistribute-list %s %s %s%s", + vty_outln (vty, " %sdistribute-list %s %s %s", v6 ? "ipv6 " : "", dist->list[j], output ? "out" : "in", - dist->ifname ? dist->ifname : "", - VTY_NEWLINE); + dist->ifname ? dist->ifname : ""); write++; } @@ -500,12 +499,11 @@ config_write_distribute (struct vty *vty) if (dist->prefix[j]) { output = j == DISTRIBUTE_V4_OUT || j == DISTRIBUTE_V6_OUT; v6 = j == DISTRIBUTE_V6_IN || j == DISTRIBUTE_V6_OUT; - vty_out (vty, " %sdistribute-list prefix %s %s %s%s", + vty_outln (vty, " %sdistribute-list prefix %s %s %s", v6 ? "ipv6 " : "", dist->prefix[j], output ? "out" : "in", - dist->ifname ? dist->ifname : "", - VTY_NEWLINE); + dist->ifname ? dist->ifname : ""); write++; } } |
