summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/command.c10
-rw-r--r--lib/grammar_sandbox.c4
-rw-r--r--lib/if.c12
-rw-r--r--lib/memory_vty.c2
-rw-r--r--lib/ns.c4
-rw-r--r--lib/plist.c2
-rwxr-xr-xlib/route_types.pl2
-rw-r--r--lib/routemap.c2
-rw-r--r--lib/smux.c2
-rw-r--r--lib/vrf.c6
-rw-r--r--lib/vrf.h4
-rw-r--r--lib/vty.c16
-rw-r--r--lib/vty.h4
13 files changed, 35 insertions, 35 deletions
diff --git a/lib/command.c b/lib/command.c
index 574e7e0b4a..9f62fef2d2 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -1349,7 +1349,7 @@ DEFUN (show_version,
vty_outln (vty, "%s %s (%s).", FRR_FULL_NAME, FRR_VERSION,
host.name ? host.name : "");
vty_outln (vty, "%s%s", FRR_COPYRIGHT, GIT_INFO);
- vty_outln (vty, "configured with:%s %s", VTY_NEWLINE,
+ vty_outln (vty, "configured with:%s %s", VTYNL,
FRR_CONFIG_ARGS);
return CMD_SUCCESS;
@@ -1385,9 +1385,9 @@ command argument (e.g. 'show ?') and describes each possible%s\
argument.%s\
2. Partial help is provided when an abbreviated argument is entered%s\
and you want to know what arguments match the input%s\
- (e.g. 'show me?'.)%s", VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE,
- VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE,
- VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE);
+ (e.g. 'show me?'.)%s", VTYNL, VTYNL, VTYNL,
+ VTYNL, VTYNL, VTYNL, VTYNL, VTYNL,
+ VTYNL, VTYNL, VTYNL, VTYNL);
return CMD_SUCCESS;
}
@@ -1488,7 +1488,7 @@ vty_write_config (struct vty *vty)
if (vty->type == VTY_TERM)
{
- vty_outln (vty, "%sCurrent configuration:",VTY_NEWLINE);
+ vty_outln (vty, "%sCurrent configuration:",VTYNL);
vty_outln (vty, "!");
}
diff --git a/lib/grammar_sandbox.c b/lib/grammar_sandbox.c
index 1eb01c4efa..5fc77475b9 100644
--- a/lib/grammar_sandbox.c
+++ b/lib/grammar_sandbox.c
@@ -414,9 +414,9 @@ DEFUN (grammar_findambig,
if (same)
{
vty_outln (vty, "'%s' AMBIGUOUS:", cur->cmd);
- vty_outln (vty, " %s%s '%s'", prev->el->name, VTY_NEWLINE,
+ vty_outln (vty, " %s%s '%s'", prev->el->name, VTYNL,
prev->el->string);
- vty_outln (vty, " %s%s '%s'", cur->el->name, VTY_NEWLINE,
+ vty_outln (vty, " %s%s '%s'", cur->el->name, VTYNL,
cur->el->string);
vty_outln (vty, "");
ambig++;
diff --git a/lib/if.c b/lib/if.c
index 3443e69097..d9b4544271 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -743,14 +743,14 @@ DEFUN_NOSH (no_interface,
if (ifp == NULL)
{
- vty_out (vty, "%% Interface %s does not exist%s", ifname, VTY_NEWLINE);
+ vty_out (vty, "%% Interface %s does not exist%s", ifname, VTYNL);
return CMD_WARNING;
}
if (CHECK_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE))
{
vty_out (vty, "%% Only inactive interfaces can be deleted%s",
- VTY_NEWLINE);
+ VTYNL);
return CMD_WARNING;
}
@@ -798,7 +798,7 @@ DEFUN (show_address,
if (p->family == AF_INET)
vty_out (vty, "%s/%d%s", inet_ntoa (p->u.prefix4), p->prefixlen,
- VTY_NEWLINE);
+ VTYNL);
}
}
return CMD_SUCCESS;
@@ -823,8 +823,8 @@ DEFUN (show_address_vrf_all,
if (!vrf->iflist || !listcount (vrf->iflist))
continue;
- vty_out (vty, "%sVRF %u%s%s", VTY_NEWLINE, vrf->vrf_id, VTY_NEWLINE,
- VTY_NEWLINE);
+ vty_out (vty, "%sVRF %u%s%s", VTYNL, vrf->vrf_id, VTYNL,
+ VTYNL);
for (ALL_LIST_ELEMENTS_RO (vrf->iflist, node, ifp))
{
@@ -834,7 +834,7 @@ DEFUN (show_address_vrf_all,
if (p->family == AF_INET)
vty_out (vty, "%s/%d%s", inet_ntoa (p->u.prefix4), p->prefixlen,
- VTY_NEWLINE);
+ VTYNL);
}
}
}
diff --git a/lib/memory_vty.c b/lib/memory_vty.c
index 56621869f9..5983efbdcc 100644
--- a/lib/memory_vty.c
+++ b/lib/memory_vty.c
@@ -110,7 +110,7 @@ DEFUN (show_modules,
vty_outln (vty, "%-12s %-25s %s%s",
"Module Name", "Version", "Description",
- VTY_NEWLINE);
+ VTYNL);
while (plug)
{
const struct frrmod_info *i = plug->info;
diff --git a/lib/ns.c b/lib/ns.c
index 40dee5dc2f..4d46ecd0af 100644
--- a/lib/ns.c
+++ b/lib/ns.c
@@ -325,7 +325,7 @@ DEFUN_NOSH (ns_netns,
if (ns->name && strcmp (ns->name, pathname) != 0)
{
vty_out (vty, "NS %u is already configured with NETNS %s%s",
- ns->ns_id, ns->name, VTY_NEWLINE);
+ ns->ns_id, ns->name, VTYNL);
return CMD_WARNING;
}
@@ -335,7 +335,7 @@ DEFUN_NOSH (ns_netns,
if (!ns_enable (ns))
{
vty_out (vty, "Can not associate NS %u with NETNS %s%s",
- ns->ns_id, ns->name, VTY_NEWLINE);
+ ns->ns_id, ns->name, VTYNL);
return CMD_WARNING;
}
diff --git a/lib/plist.c b/lib/plist.c
index 9b4bda7edc..4a223d1262 100644
--- a/lib/plist.c
+++ b/lib/plist.c
@@ -1863,7 +1863,7 @@ config_write_prefix_afi (afi_t afi, struct vty *vty)
vty_outln (vty, "");
write++;
}
- /* vty_out (vty, "!%s", VTY_NEWLINE); */
+ /* vty_out (vty, "!%s", VTYNL); */
}
for (plist = master->str.head; plist; plist = plist->next)
diff --git a/lib/route_types.pl b/lib/route_types.pl
index 27ca950787..29bcd3a672 100755
--- a/lib/route_types.pl
+++ b/lib/route_types.pl
@@ -123,7 +123,7 @@ sub codelist {
push @lines, " \" > - selected route, * - FIB route%s%s\", \\\n";
my @nl = ();
for (my $c = 0; $c < @lines + 1; $c++) {
- push @nl, "VTY_NEWLINE"
+ push @nl, "VTYNL"
}
return join("", @lines) ." ". join(", ", @nl);
}
diff --git a/lib/routemap.c b/lib/routemap.c
index a22e7a655d..fa6f2691de 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -1003,7 +1003,7 @@ vty_show_route_map_entry (struct vty *vty, struct route_map *map)
/* Description */
if (index->description)
- vty_outln (vty, " Description:%s %s", VTY_NEWLINE,
+ vty_outln (vty, " Description:%s %s", VTYNL,
index->description);
/* Match clauses */
diff --git a/lib/smux.c b/lib/smux.c
index 86fd9d5484..6f4b45f9a3 100644
--- a/lib/smux.c
+++ b/lib/smux.c
@@ -1278,7 +1278,7 @@ smux_peer_oid (struct vty *vty, const char *oid_str, const char *passwd_str)
ret = smux_str2oid (oid_str, oid, &oid_len);
if (ret != 0)
{
- vty_out (vty, "object ID malformed%s", VTY_NEWLINE);
+ vty_out (vty, "object ID malformed%s", VTYNL);
return CMD_WARNING;
}
diff --git a/lib/vrf.c b/lib/vrf.c
index 7afe7ec8e2..6ad8cd91b6 100644
--- a/lib/vrf.c
+++ b/lib/vrf.c
@@ -475,7 +475,7 @@ DEFUN_NOSH (vrf,
{
vty_out (vty, "%% VRF name %s is invalid: length exceeds "
"%d characters%s",
- vrfname, VRF_NAMSIZ, VTY_NEWLINE);
+ vrfname, VRF_NAMSIZ, VTYNL);
return CMD_WARNING;
}
@@ -501,14 +501,14 @@ DEFUN_NOSH (no_vrf,
if (vrfp == NULL)
{
- vty_out (vty, "%% VRF %s does not exist%s", vrfname, VTY_NEWLINE);
+ vty_out (vty, "%% VRF %s does not exist%s", vrfname, VTYNL);
return CMD_WARNING;
}
if (CHECK_FLAG (vrfp->status, VRF_ACTIVE))
{
vty_out (vty, "%% Only inactive VRFs can be deleted%s",
- VTY_NEWLINE);
+ VTYNL);
return CMD_WARNING;
}
diff --git a/lib/vrf.h b/lib/vrf.h
index d470349f00..8baa15c96f 100644
--- a/lib/vrf.h
+++ b/lib/vrf.h
@@ -115,12 +115,12 @@ extern vrf_id_t vrf_name_to_id (const char *);
struct vrf *vrf; \
if (!(vrf = vrf_lookup_by_name(NAME))) \
{ \
- vty_out (vty, "%% VRF %s not found%s", NAME, VTY_NEWLINE);\
+ vty_out (vty, "%% VRF %s not found%s", NAME, VTYNL);\
return CMD_WARNING; \
} \
if (vrf->vrf_id == VRF_UNKNOWN) \
{ \
- vty_out (vty, "%% VRF %s not active%s", NAME, VTY_NEWLINE);\
+ vty_out (vty, "%% VRF %s not active%s", NAME, VTYNL);\
return CMD_WARNING; \
} \
(V) = vrf->vrf_id; \
diff --git a/lib/vty.c b/lib/vty.c
index 8136f0c6a7..e351ec6912 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -169,7 +169,7 @@ vty_outln (struct vty *vty, const char *format, ...)
len = vty_out_variadic (vty, format, args);
va_end (args);
- return len + vty_out (vty, "%s", VTY_NEWLINE);
+ return len + vty_out (vty, "%s", VTYNL);
}
static int
@@ -954,7 +954,7 @@ vty_complete_command (struct vty *vty)
vty_redraw_line (vty);
break;
case CMD_ERR_NO_MATCH:
- /* vty_out (vty, "%% There is no matched command.%s", VTY_NEWLINE); */
+ /* vty_out (vty, "%% There is no matched command.%s", VTYNL); */
vty_prompt (vty);
vty_redraw_line (vty);
break;
@@ -1148,7 +1148,7 @@ vty_describe_command (struct vty *vty)
#if 0
vty_out (vty, " %-*s %s%s", width
desc->cmd[0] == '.' ? desc->cmd + 1 : desc->cmd,
- desc->str ? desc->str : "", VTY_NEWLINE);
+ desc->str ? desc->str : "", VTYNL);
#endif /* 0 */
}
@@ -1775,8 +1775,8 @@ vty_create (int vty_sock, union sockunion *su)
/* Say hello to the world. */
vty_hello (vty);
if (! no_password_check)
- vty_outln (vty, "%sUser Access Verification%s", VTY_NEWLINE,
- VTY_NEWLINE);
+ vty_outln (vty, "%sUser Access Verification%s", VTYNL,
+ VTYNL);
/* Setting up terminal. */
vty_will_echo (vty);
@@ -2336,7 +2336,7 @@ vty_timeout (struct thread *thread)
/* Clear buffer*/
buffer_reset (vty->obuf);
- vty_outln (vty, "%sVty connection is timed out.", VTY_NEWLINE);
+ vty_outln (vty, "%sVty connection is timed out.", VTYNL);
/* Close connection. */
vty->status = VTY_CLOSE;
@@ -2719,7 +2719,7 @@ DEFUN_NOSH (config_who,
if ((v = vector_slot (vtyvec, i)) != NULL)
vty_out (vty, "%svty[%d] connected from %s.%s",
v->config ? "*" : " ",
- i, v->address, VTY_NEWLINE);
+ i, v->address, VTYNL);
return CMD_SUCCESS;
}
@@ -2961,7 +2961,7 @@ DEFUN_NOSH (show_history,
}
if (vty->hist[index] != NULL)
- vty_out (vty, " %s%s", vty->hist[index], VTY_NEWLINE);
+ vty_out (vty, " %s%s", vty->hist[index], VTYNL);
index++;
}
diff --git a/lib/vty.h b/lib/vty.h
index ee2aeac675..6ef11ab98c 100644
--- a/lib/vty.h
+++ b/lib/vty.h
@@ -156,7 +156,7 @@ static inline void vty_push_context(struct vty *vty,
#define VTY_CHECK_CONTEXT(ptr) \
if (!ptr) { \
vty_out (vty, "Current configuration object was deleted " \
- "by another process.%s", VTY_NEWLINE); \
+ "by another process.%s", VTYNL); \
return CMD_WARNING; \
}
@@ -180,7 +180,7 @@ struct vty_arg
#define INTEGRATE_DEFAULT_CONFIG "frr.conf"
/* Small macro to determine newline is newline only or linefeed needed. */
-#define VTY_NEWLINE ((vty->type == VTY_TERM) ? "\r\n" : "\n")
+#define VTYNL ((vty->type == VTY_TERM) ? "\r\n" : "\n")
/* Default time out value */
#define VTY_TIMEOUT_DEFAULT 600