summaryrefslogtreecommitdiff
path: root/lib/plist.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 /lib/plist.c
parent83eba583d7be5afaf2eba35ce4d391f645af4bfa (diff)
*: ditch vty_outln(), part 1 of 2
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/plist.c')
-rw-r--r--lib/plist.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/lib/plist.c b/lib/plist.c
index 339540a2b5..9f20a412e9 100644
--- a/lib/plist.c
+++ b/lib/plist.c
@@ -882,7 +882,7 @@ prefix_entry_dup_check (struct prefix_list *plist,
static int
vty_invalid_prefix_range (struct vty *vty, const char *prefix)
{
- vty_outln (vty, "%% Invalid prefix range for %s, make sure: len < ge-value <= le-value",
+ vty_out (vty, "%% Invalid prefix range for %s, make sure: len < ge-value <= le-value\n",
prefix);
return CMD_WARNING;
}
@@ -920,7 +920,7 @@ vty_prefix_list_install (struct vty *vty, afi_t afi, const char *name,
type = PREFIX_DENY;
else
{
- vty_outln (vty, "%% prefix type must be permit or deny");
+ vty_out (vty, "%% prefix type must be permit or deny\n");
return CMD_WARNING;
}
@@ -940,7 +940,7 @@ vty_prefix_list_install (struct vty *vty, afi_t afi, const char *name,
if (ret <= 0)
{
- vty_outln (vty, "%% Malformed IPv4 prefix");
+ vty_out (vty, "%% Malformed IPv4 prefix\n");
return CMD_WARNING;
}
@@ -962,7 +962,7 @@ vty_prefix_list_install (struct vty *vty, afi_t afi, const char *name,
if (ret <= 0)
{
- vty_outln (vty, "%% Malformed IPv6 prefix");
+ vty_out (vty, "%% Malformed IPv6 prefix\n");
return CMD_WARNING;
}
@@ -973,7 +973,7 @@ vty_prefix_list_install (struct vty *vty, afi_t afi, const char *name,
break;
case AFI_L2VPN:
default:
- vty_outln (vty, "%% Unrecognized AFI (%d)", afi);
+ vty_out (vty, "%% Unrecognized AFI (%d)\n", afi);
return CMD_WARNING;
break;
}
@@ -1042,7 +1042,7 @@ vty_prefix_list_uninstall (struct vty *vty, afi_t afi, const char *name,
plist = prefix_list_lookup (afi, name);
if (! plist)
{
- vty_outln (vty, "%% Can't find specified prefix-list");
+ vty_out (vty, "%% Can't find specified prefix-list\n");
return CMD_WARNING;
}
@@ -1057,7 +1057,7 @@ vty_prefix_list_uninstall (struct vty *vty, afi_t afi, const char *name,
/* We must have, at a minimum, both the type and prefix here */
if ((typestr == NULL) || (prefix == NULL))
{
- vty_outln (vty, "%% Both prefix and type required");
+ vty_out (vty, "%% Both prefix and type required\n");
return CMD_WARNING;
}
@@ -1078,7 +1078,7 @@ vty_prefix_list_uninstall (struct vty *vty, afi_t afi, const char *name,
type = PREFIX_DENY;
else
{
- vty_outln (vty, "%% prefix type must be permit or deny");
+ vty_out (vty, "%% prefix type must be permit or deny\n");
return CMD_WARNING;
}
@@ -1096,7 +1096,7 @@ vty_prefix_list_uninstall (struct vty *vty, afi_t afi, const char *name,
if (ret <= 0)
{
- vty_outln (vty, "%% Malformed IPv4 prefix");
+ vty_out (vty, "%% Malformed IPv4 prefix\n");
return CMD_WARNING;
}
}
@@ -1113,7 +1113,7 @@ vty_prefix_list_uninstall (struct vty *vty, afi_t afi, const char *name,
if (ret <= 0)
{
- vty_outln (vty, "%% Malformed IPv6 prefix");
+ vty_out (vty, "%% Malformed IPv6 prefix\n");
return CMD_WARNING;
}
}
@@ -1123,7 +1123,7 @@ vty_prefix_list_uninstall (struct vty *vty, afi_t afi, const char *name,
if (pentry == NULL)
{
- vty_outln (vty, "%% Can't find specified prefix-list");
+ vty_out (vty, "%% Can't find specified prefix-list\n");
return CMD_WARNING;
}
@@ -1141,7 +1141,7 @@ vty_prefix_list_desc_unset (struct vty *vty, afi_t afi, const char *name)
plist = prefix_list_lookup (afi, name);
if (! plist)
{
- vty_outln (vty, "%% Can't find specified prefix-list");
+ vty_out (vty, "%% Can't find specified prefix-list\n");
return CMD_WARNING;
}
@@ -1179,21 +1179,21 @@ vty_show_prefix_entry (struct vty *vty, afi_t afi, struct prefix_list *plist,
if (dtype == normal_display)
{
- vty_outln (vty, "ip%s prefix-list %s: %d entries",
+ vty_out (vty, "ip%s prefix-list %s: %d entries\n",
afi == AFI_IP ? "" : "v6",
plist->name, plist->count);
if (plist->desc)
- vty_outln (vty, " Description: %s", plist->desc);
+ vty_out (vty, " Description: %s\n", plist->desc);
}
else if (dtype == summary_display || dtype == detail_display)
{
- vty_outln (vty, "ip%s prefix-list %s:",
+ vty_out (vty, "ip%s prefix-list %s:\n",
afi == AFI_IP ? "" : "v6", plist->name);
if (plist->desc)
- vty_outln (vty, " Description: %s", plist->desc);
+ vty_out (vty, " Description: %s\n", plist->desc);
- vty_outln (vty, " count: %d, range entries: %d, sequences: %u - %u",
+ vty_out (vty, " count: %d, range entries: %d, sequences: %u - %u\n",
plist->count, plist->rangecount,
plist->head ? plist->head->seq : 0,
plist->tail ? plist->tail->seq : 0);
@@ -1259,7 +1259,7 @@ vty_show_prefix_list (struct vty *vty, afi_t afi, const char *name,
plist = prefix_list_lookup (afi, name);
if (! plist)
{
- vty_outln (vty, "%% Can't find specified prefix-list");
+ vty_out (vty, "%% Can't find specified prefix-list\n");
return CMD_WARNING;
}
vty_show_prefix_entry (vty, afi, plist, master, dtype, seqnum);
@@ -1269,7 +1269,7 @@ vty_show_prefix_list (struct vty *vty, afi_t afi, const char *name,
if (dtype == detail_display || dtype == summary_display)
{
if (master->recent)
- vty_outln (vty, "Prefix-list with the last deletion/insertion: %s",
+ vty_out (vty, "Prefix-list with the last deletion/insertion: %s\n",
master->recent->name);
}
@@ -1296,14 +1296,14 @@ vty_show_prefix_list_prefix (struct vty *vty, afi_t afi, const char *name,
plist = prefix_list_lookup (afi, name);
if (! plist)
{
- vty_outln (vty, "%% Can't find specified prefix-list");
+ vty_out (vty, "%% Can't find specified prefix-list\n");
return CMD_WARNING;
}
ret = str2prefix (prefix, &p);
if (ret <= 0)
{
- vty_outln (vty, "%% prefix is malformed");
+ vty_out (vty, "%% prefix is malformed\n");
return CMD_WARNING;
}
@@ -1384,7 +1384,7 @@ vty_clear_prefix_list (struct vty *vty, afi_t afi, const char *name,
plist = prefix_list_lookup (afi, name);
if (! plist)
{
- vty_outln (vty, "%% Can't find specified prefix-list");
+ vty_out (vty, "%% Can't find specified prefix-list\n");
return CMD_WARNING;
}
@@ -1393,7 +1393,7 @@ vty_clear_prefix_list (struct vty *vty, afi_t afi, const char *name,
ret = str2prefix (prefix, &p);
if (ret <= 0)
{
- vty_outln (vty, "%% prefix is malformed");
+ vty_out (vty, "%% prefix is malformed\n");
return CMD_WARNING;
}
}
@@ -1816,16 +1816,16 @@ config_write_prefix_afi (afi_t afi, struct vty *vty)
if (! master->seqnum)
{
- vty_outln (vty, "no ip%s prefix-list sequence-number",
+ vty_out (vty, "no ip%s prefix-list sequence-number\n",
afi == AFI_IP ? "" : "v6");
- vty_outln (vty, "!");
+ vty_out (vty, "!\n");
}
for (plist = master->num.head; plist; plist = plist->next)
{
if (plist->desc)
{
- vty_outln (vty, "ip%s prefix-list %s description %s",
+ vty_out (vty, "ip%s prefix-list %s description %s\n",
afi == AFI_IP ? "" : "v6",
plist->name, plist->desc);
write++;
@@ -1868,7 +1868,7 @@ config_write_prefix_afi (afi_t afi, struct vty *vty)
{
if (plist->desc)
{
- vty_outln (vty, "ip%s prefix-list %s description %s",
+ vty_out (vty, "ip%s prefix-list %s description %s\n",
afi == AFI_IP ? "" : "v6",
plist->name, plist->desc);
write++;
@@ -2046,13 +2046,13 @@ prefix_bgp_show_prefix_list (struct vty *vty, afi_t afi, char *name, u_char use_
else
json_object_object_add(json, "ipv6PrefixList", json_prefix);
- 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, "ip%s prefix-list %s: %d entries",
+ vty_out (vty, "ip%s prefix-list %s: %d entries\n",
afi == AFI_IP ? "" : "v6",
plist->name, plist->count);