]> git.puffer.fish Git - matthieu/frr.git/commitdiff
*: remove VTYNL, part 3 of 6
authorDavid Lamparter <equinox@opensourcerouting.org>
Thu, 13 Jul 2017 17:20:20 +0000 (19:20 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Fri, 14 Jul 2017 08:20:03 +0000 (10:20 +0200)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
27 files changed:
bgpd/bgp_evpn_vty.c
bgpd/bgp_mplsvpn.c
bgpd/bgp_nexthop.c
bgpd/bgp_route.c
bgpd/bgp_updgrp_adv.c
bgpd/bgp_vpn.c
bgpd/bgp_vty.c
bgpd/bgpd.c
bgpd/rfapi/rfapi.c
eigrpd/eigrp_dump.c
isisd/isis_te.c
ldpd/ldp_vty_exec.c
lib/command.c
lib/if.c
lib/routemap.c
lib/vty.c
nhrpd/nhrp_vty.c
ospf6d/ospf6_lsa.c
ospf6d/ospf6d.c
ospfd/ospf_dump.c
ospfd/ospf_te.c
ospfd/ospf_vty.c
pimd/pim_cmd.c
vtysh/vtysh.c
zebra/interface.c
zebra/zebra_fpm.c
zebra/zebra_vty.c

index 603171138e752dafd8aefe1b9867a2d095c7fd47..a76e499f8c585f792631561ce97ab30d6d21853a 100644 (file)
@@ -146,8 +146,7 @@ bgp_show_ethernet_vpn(struct vty *vty, struct prefix_rd *prd,
                                                                vty_out (vty,
                                                                        "Status codes: s suppressed, d damped, h history, * valid, > best, i - internal\n");
                                                                vty_out (vty,
-                                                                       "Origin codes: i - IGP, e - EGP, ? - incomplete%s\n",
-                                                                       VTYNL);
+                                                                       "Origin codes: i - IGP, e - EGP, ? - incomplete\n\n");
                                                                vty_out(vty, V4_HEADER);
                                                        }
                                                }
@@ -256,8 +255,7 @@ bgp_show_ethernet_vpn(struct vty *vty, struct prefix_rd *prd,
                vty_out (vty, "No prefixes displayed, %ld exist\n",
                          total_count);
        else
-               vty_out (vty, "%sDisplayed %ld out of %ld total prefixes\n",
-                       VTYNL, output_count, total_count);
+               vty_out (vty, "\nDisplayed %ld out of %ld total prefixes\n", output_count, total_count);
        return CMD_SUCCESS;
 }
 
index 0a4d589b86b679dba8631975bc4506060805d02b..c1db9fed2f5e63437da3fcb29bb9c631884b84e3 100644 (file)
@@ -641,8 +641,7 @@ bgp_show_mpls_vpn (struct vty *vty, afi_t afi, struct prefix_rd *prd,
                                       inet_ntoa(bgp->router_id));
                              vty_out (vty,
                                          "Status codes: s suppressed, d damped, h history, * valid, > best, i - internal\n");
-                             vty_out (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete%s\n",
-                                      VTYNL);
+                             vty_out (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete\n\n");
                              vty_out (vty, V4_HEADER);
                            }
                         }
@@ -749,8 +748,7 @@ bgp_show_mpls_vpn (struct vty *vty, afi_t afi, struct prefix_rd *prd,
       if (output_count == 0)
        vty_out (vty, "No prefixes displayed, %ld exist\n", total_count);
       else
-       vty_out (vty, "%sDisplayed %ld routes and %ld total paths\n",
-                VTYNL, output_count, total_count);
+       vty_out (vty, "\nDisplayed %ld routes and %ld total paths\n", output_count, total_count);
     }
 
   return CMD_SUCCESS;
index e2d93e9f37222f66d1682aabc375295bb20490dd..45ccb37434fb4ead4b457a8ed26644d201b0a32f 100644 (file)
@@ -478,8 +478,7 @@ bgp_show_all_instances_nexthops_vty (struct vty *vty)
 
   for (ALL_LIST_ELEMENTS (bm->bgp, node, nnode, bgp))
     {
-      vty_out (vty, "%sInstance %s:\n",
-               VTYNL,
+      vty_out (vty, "\nInstance %s:\n",
                (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) ? "Default" : bgp->name);
       bgp_show_nexthops (vty, bgp, 0);
     }
index b4bdab316182c1e01f8ce1bac4b88b836e6d9154..80161412d4dd32cfb2711ffad5998a2ea3341526 100644 (file)
@@ -6191,7 +6191,7 @@ route_vty_out_route (struct prefix *p, struct vty *vty)
 
   len = 17 - len;
   if (len < 1)
-    vty_out (vty, "%s%*s", VTYNL, 20, " ");
+    vty_out (vty, "\n%*s", 20, " ");
   else
     vty_out (vty, "%*s", len, " ");
 }
@@ -6415,7 +6415,7 @@ route_vty_out (struct vty *vty, struct prefix *p,
                      len = 7 - len; /* len of IPv6 addr + max len of def ifname */
 
                      if (len < 1)
-                       vty_out (vty, "%s%*s", VTYNL, 45, " ");
+                       vty_out (vty, "\n%*s", 45, " ");
                      else
                        vty_out (vty, "%*s", len, " ");
                    }
@@ -6428,7 +6428,7 @@ route_vty_out (struct vty *vty, struct prefix *p,
                      len = 16 - len;
 
                      if (len < 1)
-                       vty_out (vty, "%s%*s", VTYNL, 36, " ");
+                       vty_out (vty, "\n%*s", 36, " ");
                      else
                        vty_out (vty, "%*s", len, " ");
                    }
@@ -6442,7 +6442,7 @@ route_vty_out (struct vty *vty, struct prefix *p,
                  len = 16 - len;
 
                  if (len < 1)
-                   vty_out (vty, "%s%*s", VTYNL, 36, " ");
+                   vty_out (vty, "\n%*s", 36, " ");
                  else
                    vty_out (vty, "%*s", len, " ");
                }
@@ -6630,7 +6630,7 @@ route_vty_out_tmp (struct vty *vty, struct prefix *p, struct attr *attr, safi_t
                              buf, BUFSIZ));
               len = 16 - len;
               if (len < 1)
-                vty_out (vty, "%s%*s", VTYNL, 36, " ");
+                vty_out (vty, "\n%*s", 36, " ");
               else
                 vty_out (vty, "%*s", len, " ");
             }
@@ -6884,7 +6884,7 @@ damp_route_vty_out (struct vty *vty, struct prefix *p, struct bgp_info *binfo,
   if (len < 1)
     {
       if (!use_json)
-        vty_out (vty, "%s%*s", VTYNL, 34, " ");
+        vty_out (vty, "\n%*s", 34, " ");
     }
   else
     {
@@ -6954,7 +6954,7 @@ flap_route_vty_out (struct vty *vty, struct prefix *p, struct bgp_info *binfo,
   if (len < 1)
     {
       if (!use_json)
-        vty_out (vty, "%s%*s", VTYNL, 33, " ");
+        vty_out (vty, "\n%*s", 33, " ");
     }
   else
     {
@@ -8043,8 +8043,7 @@ bgp_show_table (struct vty *vty, struct bgp *bgp, struct bgp_table *table,
                        total_count);
         }
       else
-        vty_out (vty, "%sDisplayed  %ld routes and %ld total paths\n",
-                 VTYNL, output_count, total_count);
+        vty_out (vty, "\nDisplayed  %ld routes and %ld total paths\n", output_count, total_count);
     }
 
   return CMD_SUCCESS;
@@ -8105,8 +8104,7 @@ bgp_show_all_instances_routes_vty (struct vty *vty, afi_t afi, safi_t safi,
         }
       else
         {
-          vty_out (vty, "%sInstance %s:\n",
-                   VTYNL,
+          vty_out (vty, "\nInstance %s:\n",
                    (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) ? "Default" : bgp->name);
         }
       bgp_show (vty, bgp, afi, safi, bgp_show_type_normal, NULL, use_json);
@@ -9422,8 +9420,7 @@ bgp_peer_counts (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi, u_c
         }
 
       vty_out (vty, "PfxCt: %ld\n", peer->pcount[afi][safi]);
-      vty_out (vty, "%sCounts from RIB table walk:%s\n",
-               VTYNL, VTYNL);
+      vty_out (vty, "\nCounts from RIB table walk:\n\n");
 
       for (i = 0; i < PCOUNT_MAX; i++)
         vty_out (vty, "%20s: %-10d\n", pcount_strs[i], pcounts.count[i]);
@@ -9649,8 +9646,7 @@ show_adj_route (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi,
           vty_out (vty, BGP_SHOW_SCODE_HEADER);
           vty_out (vty, BGP_SHOW_OCODE_HEADER);
 
-          vty_out (vty, "Originating default network 0.0.0.0%s\n",
-                   VTYNL);
+          vty_out (vty, "Originating default network 0.0.0.0\n\n");
         }
       header1 = 0;
     }
@@ -9757,8 +9753,7 @@ show_adj_route (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi,
       if (use_json)
         json_object_int_add(json, "totalPrefixCounter", output_count);
       else
-        vty_out (vty, "%sTotal number of prefixes %ld\n",
-                 VTYNL, output_count);
+        vty_out (vty, "\nTotal number of prefixes %ld\n", output_count);
     }
   if (use_json)
     {
index aa3a53098e399f24ba95bf8a1ba54d12820491a6..6524e8435a38c882f4437ea6ecb4b1d6e948666c 100644 (file)
@@ -250,8 +250,7 @@ subgrp_show_adjq_vty (struct update_subgroup *subgrp, struct vty *vty,
            }
        }
   if (output_count != 0)
-    vty_out (vty, "%sTotal number of prefixes %ld\n",
-            VTYNL, output_count);
+    vty_out (vty, "\nTotal number of prefixes %ld\n", output_count);
 }
 
 static int
index e1fed31a1121f3fba78f13dcb0603d5fb4bd95be..c7f8ae3c0ddc425cca2a23fc249b2b93d0b3981b 100644 (file)
@@ -108,8 +108,7 @@ show_adj_route_vpn (struct vty *vty, struct peer *peer, struct prefix_rd *prd,
                                    inet_ntoa(bgp->router_id));
                           vty_out (vty,
                                      "Status codes: s suppressed, d damped, h history, * valid, > best, i - internal\n");
-                          vty_out (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete%s\n",
-                                   VTYNL);
+                          vty_out (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete\n\n");
                           vty_out (vty, V4_HEADER);
                         }
                       header = 0;
index 59fec7fb8a7e2b7ef461e34bed82d6ec70d104f6..e84a7f005ee749c183ac826281f6703cf11b84b5 100644 (file)
@@ -6628,8 +6628,7 @@ DEFUN (show_bgp_vrfs,
   else
     {
       if (count)
-        vty_out (vty, "%sTotal number of VRFs (including default): %d%s",
-                 VTYNL, count, VTYNL);
+        vty_out (vty, "\nTotal number of VRFs (including default): %d%s", count, VTYNL);
     }
 
   return CMD_SUCCESS;
@@ -7111,7 +7110,7 @@ bgp_show_summary (struct vty *vty, struct bgp *bgp, int afi, int safi,
   else
     {
       if (count)
-        vty_out (vty, "%sTotal number of neighbors %d%s", VTYNL,
+        vty_out (vty, "\nTotal number of neighbors %d%s",
                 count, VTYNL);
       else
         {
@@ -7198,8 +7197,7 @@ bgp_show_summary_afi_safi (struct vty *vty, struct bgp *bgp, int afi, int safi,
                     }
                   else
                     {
-                      vty_out (vty, "%s%s Summary:%s",
-                               VTYNL, afi_safi_print(afi, safi), VTYNL);
+                      vty_out (vty, "\n%s Summary:%s", afi_safi_print(afi, safi), VTYNL);
                     }
                 }
               bgp_show_summary (vty, bgp, afi, safi, use_json, json);
@@ -7251,8 +7249,7 @@ bgp_show_all_instances_summary_vty (struct vty *vty, afi_t afi, safi_t safi,
         }
       else
         {
-          vty_out (vty, "%sInstance %s:%s",
-                   VTYNL,
+          vty_out (vty, "\nInstance %s:%s",
                    (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)
                    ? "Default" : bgp->name, VTYNL);
         }
@@ -8493,7 +8490,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
 
                   if (CHECK_FLAG (p->cap, PEER_CAP_ENHE_RCV))
                    {
-                     vty_out (vty, "      Address families by peer:%s        ", VTYNL);
+                     vty_out (vty, "      Address families by peer:\n        ");
                       for (safi = SAFI_UNICAST ; safi < SAFI_MAX ; safi++)
                         if (CHECK_FLAG (p->af_cap[AFI_IP][safi], PEER_CAP_ENHE_AF_RCV))
                           vty_out (vty, "           %s%s",
@@ -8564,7 +8561,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
 
                      vty_out (vty, "      Remote Restart timer is %d seconds%s",
                               p->v_gr_restart, VTYNL);
-                     vty_out (vty, "      Address families by peer:%s        ", VTYNL);
+                     vty_out (vty, "      Address families by peer:\n        ");
 
                      for (afi = AFI_IP ; afi < AFI_MAX ; afi++)
                        for (safi = SAFI_UNICAST ; safi < SAFI_MAX ; safi++)
@@ -8865,7 +8862,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
           if (p->last_reset_cause_size)
             {
               msg = p->last_reset_cause;
-              vty_out(vty, "  Message received that caused BGP to send a NOTIFICATION:%s    ", VTYNL);
+              vty_out(vty, "  Message received that caused BGP to send a NOTIFICATION:\n    ");
               for (i = 1; i <= p->last_reset_cause_size; i++)
                 {
                   vty_out(vty, "%02X", *msg++);
@@ -8874,7 +8871,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
                     {
                       if (i % 16 == 0)
                         {
-                          vty_out(vty, "%s    ", VTYNL);
+                          vty_out(vty, "\n    ");
                         }
                       else if (i % 4 == 0)
                         {
@@ -9185,8 +9182,7 @@ bgp_show_all_instances_neighbors_vty (struct vty *vty, u_char use_json)
         }
       else
         {
-          vty_out (vty, "%sInstance %s:%s",
-                   VTYNL,
+          vty_out (vty, "\nInstance %s:%s",
                    (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)
                    ? "Default" : bgp->name,
                    VTYNL);
@@ -9403,8 +9399,7 @@ bgp_show_all_instances_updgrps_vty (struct vty *vty, afi_t afi, safi_t safi)
 
   for (ALL_LIST_ELEMENTS (bm->bgp, node, nnode, bgp))
     {
-      vty_out (vty, "%sInstance %s:%s",
-               VTYNL,
+      vty_out (vty, "\nInstance %s:%s",
                (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) ? "Default" : bgp->name,
                VTYNL);
       update_group_show(bgp, afi, safi, vty, 0);
@@ -9789,14 +9784,11 @@ bgp_show_one_peer_group (struct vty *vty, struct peer_group *group)
 
   if (conf->as_type == AS_SPECIFIED ||
       conf->as_type == AS_EXTERNAL) {
-  vty_out (vty, "%sBGP peer-group %s, remote AS %d%s",
-           VTYNL, group->name, conf->as, VTYNL);
+  vty_out (vty, "\nBGP peer-group %s, remote AS %d%s", group->name, conf->as, VTYNL);
   } else if (conf->as_type == AS_INTERNAL) {
-    vty_out (vty, "%sBGP peer-group %s, remote AS %d%s",
-            VTYNL, group->name, group->bgp->as, VTYNL);
+    vty_out (vty, "\nBGP peer-group %s, remote AS %d%s", group->name, group->bgp->as, VTYNL);
   } else {
-    vty_out (vty, "%sBGP peer-group %s%s",
-            VTYNL, group->name, VTYNL);
+    vty_out (vty, "\nBGP peer-group %s%s", group->name, VTYNL);
   }
 
   if ((group->bgp->as == conf->as) || (conf->as_type == AS_INTERNAL))
index 2dd81d407037381c1b58f3e1c1aca4bc44947081..54d4a66ad38ceb6d3e1c9148a5e90e2af2ca8932 100644 (file)
@@ -7296,7 +7296,7 @@ bgp_config_write_family_header (struct vty *vty, afi_t afi, safi_t safi,
   if (*write)
     return;
 
-  vty_out (vty, " !%s address-family ", VTYNL);
+  vty_out (vty, " !\n address-family ");
 
   if (afi == AFI_IP)
     {
index c78045d1e88ad839ab9f6eccfac4ed40b1eb6bd6..6e2f3f2b8885483a3d07b577f20459a43490be3f 100644 (file)
@@ -3837,8 +3837,7 @@ DEFUN (debug_rfapi_show_import,
               lni = lni_as_ptr;
               if (first_l2)
                 {
-                  vty_out (vty, "%sLNI-based Ethernet Tables:\n",
-                           VTYNL);
+                  vty_out (vty, "\nLNI-based Ethernet Tables:\n");
                   first_l2 = 0;
                 }
               snprintf (buf, BUFSIZ, "L2VPN LNI=%u", lni);
index 7ba234d0ff3daf01c257d24c090b901c6c941700..70716d1667994393637c73539e1cd57195340893 100644 (file)
@@ -210,8 +210,7 @@ void
 show_ip_eigrp_interface_header (struct vty *vty, struct eigrp *eigrp)
 {
 
-  vty_out (vty, "%s%s%d%s%s%s %-10s %-10s %-10s %-6s %-12s %-7s %-14s %-12s %-8s %-8s %-8s%s %-39s %-12s %-7s %-14s %-12s %-8s\n",
-           VTYNL,
+  vty_out (vty, "\n%s%d%s%s%s %-10s %-10s %-10s %-6s %-12s %-7s %-14s %-12s %-8s %-8s %-8s%s %-39s %-12s %-7s %-14s %-12s %-8s\n",
            "EIGRP interfaces for AS(",eigrp->AS,")",VTYNL,VTYNL,
            "Interface", "Bandwidth", "Delay", "Peers", "Xmit Queue", "Mean",
            "Pacing Time", "Multicast", "Pending", "Hello", "Holdtime",
@@ -257,8 +256,7 @@ show_ip_eigrp_interface_detail (struct vty *vty, struct eigrp *eigrp,
 void
 show_ip_eigrp_neighbor_header (struct vty *vty, struct eigrp *eigrp)
 {
-  vty_out (vty, "%s%s%d%s%s%s%-3s %-17s %-20s %-6s %-8s %-6s %-5s %-5s %-5s%s %-41s %-6s %-8s %-6s %-4s %-6s %-5s \n",
-           VTYNL,
+  vty_out (vty, "\n%s%d%s%s%s%-3s %-17s %-20s %-6s %-8s %-6s %-5s %-5s %-5s%s %-41s %-6s %-8s %-6s %-4s %-6s %-5s \n",
            "EIGRP neighbors for AS(",eigrp->AS,")",VTYNL,VTYNL,
            "H", "Address", "Interface", "Hold", "Uptime",
            "SRTT", "RTO", "Q", "Seq", VTYNL
@@ -298,8 +296,7 @@ show_ip_eigrp_topology_header (struct vty *vty, struct eigrp *eigrp)
   struct in_addr router_id;
   router_id.s_addr = eigrp->router_id;
 
-  vty_out (vty, "%sEIGRP Topology Table for AS(%d)/ID(%s)%s\n",
-           VTYNL, eigrp->AS, inet_ntoa(router_id), VTYNL);
+  vty_out (vty, "\nEIGRP Topology Table for AS(%d)/ID(%s)%s\n", eigrp->AS, inet_ntoa(router_id), VTYNL);
   vty_out (vty, "Codes: P - Passive, A - Active, U - Update, Q - Query, "
            "R - Reply%s       r - reply Status, s - sia Status%s\n",
            VTYNL, VTYNL);
index 47377bd7aeaecaa1dc4753c4f01570742a04f244..e26bb6e46bb12040ecaddffd558d629a85902017 100644 (file)
@@ -968,7 +968,7 @@ show_vty_unknown_tlv (struct vty *vty, struct subtlv_header *tlvh)
               vty_out (vty, " %#.2x", v[i]);
               if (rtn == 8)
                 {
-                  vty_out (vty, "%s             [%.2x]", VTYNL, i + 1);
+                  vty_out (vty, "\n             [%.2x]", i + 1);
                   rtn = 1;
                 }
               else
@@ -1299,7 +1299,7 @@ show_mpls_te_sub (struct vty *vty, struct interface *ifp)
       show_vty_subtlv_res_bw (vty, &mtc->res_bw);
       show_vty_subtlv_ava_bw (vty, &mtc->ava_bw);
       show_vty_subtlv_use_bw (vty, &mtc->use_bw);
-      vty_out (vty, "---------------%s\n", VTYNL);
+      vty_out (vty, "---------------\n\n");
     }
   else
     {
index 476b9b1735bf5a99efcb3d5ac2b710e54f1a916e..ed87e213879e6b5d45ffb1e558df994012b01334 100644 (file)
@@ -211,7 +211,7 @@ show_discovery_msg(struct vty *vty, struct imsg *imsg,
 
                        vty_out(vty, "%-8s %-15s ", "Targeted", addr);
                        if (strlen(addr) > 15)
-                               vty_out(vty, "%s%46s", VTYNL, " ");
+                               vty_out(vty, "\n%46s", " ");
                        break;
                }
                vty_out (vty, "%9u\n", adj->holdtime);
@@ -511,7 +511,7 @@ show_nbr_msg(struct vty *vty, struct imsg *imsg, struct show_params *params)
                    af_name(nbr->af), inet_ntoa(nbr->id),
                    nbr_state_name(nbr->nbr_state), addr);
                if (strlen(addr) > 15)
-                       vty_out(vty, "%s%48s", VTYNL, " ");
+                       vty_out(vty, "\n%48s", " ");
                vty_out (vty, " %8s\n", log_time(nbr->uptime));
                break;
        case IMSG_CTL_END:
@@ -1021,7 +1021,7 @@ show_lib_msg(struct vty *vty, struct imsg *imsg, struct show_params *params)
 
                vty_out(vty, "%-4s %-20s", af_name(rt->af), dstnet);
                if (strlen(dstnet) > 20)
-                       vty_out(vty, "%s%25s", VTYNL, " ");
+                       vty_out(vty, "\n%25s", " ");
                vty_out (vty, " %-15s %-11s %-13s %6s\n", inet_ntoa(rt->nexthop),
                    log_label(rt->local_label), log_label(rt->remote_label),
                    rt->in_use ? "yes" : "no");
index ad197468a5d59276ab0d21a7758d0feb7ba18112..c9fbaf47be58c8f638cbb1bfb99a092689922755 100644 (file)
@@ -1349,7 +1349,7 @@ DEFUN (show_version,
   vty_out (vty, "%s %s (%s).\n", FRR_FULL_NAME, FRR_VERSION,
           host.name ? host.name : "");
   vty_out (vty, "%s%s\n", FRR_COPYRIGHT, GIT_INFO);
-  vty_out (vty, "configured with:%s    %s\n", VTYNL,
+  vty_out (vty, "configured with:\n    %s\n",
            FRR_CONFIG_ARGS);
 
   return CMD_SUCCESS;
@@ -1374,20 +1374,18 @@ DEFUN (config_help,
        "Description of the interactive help system\n")
 {
   vty_out (vty,
-           "Quagga VTY provides advanced help feature.  When you need help,%s\
-anytime at the command line please press '?'.%s\
-%s\
-If nothing matches, the help list will be empty and you must backup%s\
- until entering a '?' shows the available options.%s\
-Two styles of help are provided:%s\
-1. Full help is available when you are ready to enter a%s\
-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\n", VTYNL, VTYNL, VTYNL,
-           VTYNL, VTYNL, VTYNL, VTYNL, VTYNL,
-           VTYNL, VTYNL, VTYNL, VTYNL);
+           "Quagga VTY provides advanced help feature.  When you need help,\n\
+anytime at the command line please press '?'.\n\
+\n\
+If nothing matches, the help list will be empty and you must backup\n\
+ until entering a '?' shows the available options.\n\
+Two styles of help are provided:\n\
+1. Full help is available when you are ready to enter a\n\
+command argument (e.g. 'show ?') and describes each possible\n\
+argument.\n\
+2. Partial help is provided when an abbreviated argument is entered\n\
+   and you want to know what arguments match the input\n\
+   (e.g. 'show me?'.)\n\n");
   return CMD_SUCCESS;
 }
 
@@ -1488,7 +1486,7 @@ vty_write_config (struct vty *vty)
 
   if (vty->type == VTY_TERM)
     {
-      vty_out (vty, "%sCurrent configuration:\n",VTYNL);
+      vty_out (vty, "\nCurrent configuration:\n");
       vty_out (vty, "!\n");
     }
 
index e6a957a9583137682174bcca0a8847e9677a1d44..18da3f2f3751d48745582fe2e68f3df9ca05a2b5 100644 (file)
--- a/lib/if.c
+++ b/lib/if.c
@@ -818,7 +818,7 @@ DEFUN (show_address_vrf_all,
       if (!vrf->iflist || !listcount (vrf->iflist))
         continue;
 
-      vty_out (vty, "%sVRF %u%s%s", VTYNL, vrf->vrf_id, VTYNL,
+      vty_out (vty, "\nVRF %u%s%s", vrf->vrf_id, VTYNL,
               VTYNL);
 
       for (ALL_LIST_ELEMENTS_RO (vrf->iflist, node, ifp))
index 6e483234a6cc02116d379b98c23b02ba9869ffa4..5e5f804bf047429cbe6ce6f3b484a02eef8e874f 100644 (file)
@@ -1003,7 +1003,7 @@ vty_show_route_map_entry (struct vty *vty, struct route_map *map)
 
       /* Description */
       if (index->description)
-       vty_out (vty, "  Description:%s    %s\n", VTYNL,
+       vty_out (vty, "  Description:\n    %s\n",
                 index->description);
       
       /* Match clauses */
index db0fbdd6d4cb0d13bdd9cebde4be5bcaed6eff26..fea1842bf7e1432eef8e0701e381b416fc596514 100644 (file)
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -1759,8 +1759,7 @@ vty_create (int vty_sock, union sockunion *su)
   /* Say hello to the world. */
   vty_hello (vty);
   if (! no_password_check)
-    vty_out (vty, "%sUser Access Verification%s\n", VTYNL,
-               VTYNL);
+    vty_out (vty, "\nUser Access Verification\n\n");
 
   /* Setting up terminal. */
   vty_will_echo (vty);
@@ -2320,7 +2319,7 @@ vty_timeout (struct thread *thread)
 
   /* Clear buffer*/
   buffer_reset (vty->obuf);
-  vty_out (vty, "%sVty connection is timed out.\n", VTYNL);
+  vty_out (vty, "\nVty connection is timed out.\n");
 
   /* Close connection. */
   vty->status = VTY_CLOSE;
index a11d109f393bb2dc398d80766c9f17551de79b3b..01300cb5cb8441bfca90671e229ab39abe6783f0 100644 (file)
@@ -731,7 +731,7 @@ DEFUN(show_ip_nhrp, show_ip_nhrp_cmd,
        } else if (argv[3]->text[0] == 's') {
                nhrp_shortcut_foreach(ctx.afi, show_ip_nhrp_shortcut, &ctx);
        } else {
-               vty_out (vty, "Status: ok%s\n", VTYNL);
+               vty_out (vty, "Status: ok\n\n");
                ctx.count++;
                for (ALL_LIST_ELEMENTS_RO(vrf_iflist(VRF_DEFAULT), node, ifp))
                        nhrp_cache_foreach(ifp, show_ip_opennhrp_cache, &ctx);
index 90ba0dc74feb95c0e4e3a0e4c30030265a7e5706..3f6263563dea3bd1512096985429db9a2e2fa9f8 100644 (file)
@@ -58,7 +58,7 @@ ospf6_unknown_lsa_show (struct vty *vty, struct ospf6_lsa *lsa)
   for (current = start; current < end; current ++)
     {
       if ((current - start) % 16 == 0)
-        vty_out (vty, "%s        ", VTYNL);
+        vty_out (vty, "\n        ");
       else if ((current - start) % 4 == 0)
         vty_out (vty, " ");
 
@@ -66,7 +66,7 @@ ospf6_unknown_lsa_show (struct vty *vty, struct ospf6_lsa *lsa)
       vty_out (vty, "%s", byte);
     }
 
-  vty_out (vty, "%s%s", VTYNL, VTYNL);
+  vty_out (vty, "\n\n");
   return 0;
 }
 
@@ -451,7 +451,7 @@ ospf6_lsa_show_dump (struct vty *vty, struct ospf6_lsa *lsa)
   for (current = start; current < end; current ++)
     {
       if ((current - start) % 16 == 0)
-        vty_out (vty, "%s        ", VTYNL);
+        vty_out (vty, "\n        ");
       else if ((current - start) % 4 == 0)
         vty_out (vty, " ");
 
@@ -459,7 +459,7 @@ ospf6_lsa_show_dump (struct vty *vty, struct ospf6_lsa *lsa)
       vty_out (vty, "%s", byte);
     }
 
-  vty_out (vty, "%s%s", VTYNL, VTYNL);
+  vty_out (vty, "\n\n");
   return;
 }
 
index a7153893c05cc82e026cf82e3642560dbde6ce33..bee7828a9ae78127e18e9d4805846c99013b40de 100644 (file)
@@ -1157,8 +1157,7 @@ DEFUN (show_ipv6_ospf6_linkstate,
 
   for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, node, oa))
     {
-      vty_out (vty, "%s        SPF Result in Area %s%s%s",
-               VTYNL, oa->name, VTYNL, VTYNL);
+      vty_out (vty, "\n        SPF Result in Area %s%s%s", oa->name, VTYNL, VTYNL);
       ospf6_linkstate_table_show (vty, idx_ipv4, argc, argv, oa->spf_table);
     }
 
@@ -1185,8 +1184,7 @@ DEFUN (show_ipv6_ospf6_linkstate_detail,
 
   for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, node, oa))
     {
-      vty_out (vty, "%s        SPF Result in Area %s%s%s",
-               VTYNL, oa->name, VTYNL, VTYNL);
+      vty_out (vty, "\n        SPF Result in Area %s%s%s", oa->name, VTYNL, VTYNL);
       ospf6_linkstate_table_show (vty, idx_detail, argc, argv, oa->spf_table);
     }
 
index 61b4a2ff140df2060a54857e443ec02c279a1fb6..8707960aef4b82a72a2ea07a8a7a4712d1ef9764 100644 (file)
@@ -1568,7 +1568,7 @@ show_debugging_ospf_common (struct vty *vty, struct ospf *ospf)
   int i;
 
   if (ospf->instance)
-    vty_out (vty, "%sOSPF Instance: %d%s\n", VTYNL, ospf->instance,
+    vty_out (vty, "\nOSPF Instance: %d%s\n", ospf->instance,
              VTYNL);
 
   vty_out (vty, "OSPF debugging status:\n");
index 5739578f550821fc6a1c71926cfa1e0109e662b7..c34d97ff29222d2fe5cd1b6d0ede1ef5b6f4a8fd 100644 (file)
@@ -2585,7 +2585,7 @@ show_mpls_te_link_sub (struct vty *vty, struct interface *ifp)
         show_vty_link_subtlv_ava_bw (vty, &lp->ava_bw.header);
       if (TLV_TYPE(lp->use_bw) != 0)
         show_vty_link_subtlv_use_bw (vty, &lp->use_bw.header);
-      vty_out (vty, "---------------%s\n", VTYNL);
+      vty_out (vty, "---------------\n\n");
     }
   else
     {
index 60fb352b97a3ef8b4adca697ad8b60fd4a9ec5c2..e0cbc842ec9366bf8b9fd8b56d83b8c7bdc00eeb 100644 (file)
@@ -806,8 +806,7 @@ ospf_find_vl_data (struct ospf *ospf, struct ospf_vl_config_data *vl_config)
   if (area_id.s_addr == OSPF_AREA_BACKBONE)
     {
       vty_out (vty, 
-              "Configuring VLs over the backbone is not allowed%s",
-               VTYNL);
+              "Configuring VLs over the backbone is not allowed\n");
       return NULL;
     }
   area = ospf_area_get (ospf, area_id);
@@ -2748,7 +2747,7 @@ show_ip_ospf_area (struct vty *vty, struct ospf_area *area, json_object *json_ar
         }
       else
         {
-          vty_out (vty, "   It is an NSSA configuration. %s   Elected NSSA/ABR performs type-7/type-5 LSA translation. %s", VTYNL, VTYNL);
+          vty_out (vty, "   It is an NSSA configuration. \n   Elected NSSA/ABR performs type-7/type-5 LSA translation. \n");
           if (! IS_OSPF_ABR (area->ospf))
             vty_out (vty, "   It is not ABR, therefore not Translator. \n");
           else if (area->NSSATranslatorState)
@@ -2918,7 +2917,7 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char use_json)
         }
       else
         {
-          vty_out (vty, "%sOSPF Instance: %d%s%s", VTYNL, ospf->instance,
+          vty_out (vty, "\nOSPF Instance: %d%s%s", ospf->instance,
                    VTYNL, VTYNL);
         }
     }
@@ -3517,7 +3516,7 @@ show_ip_ospf_interface_common (struct vty *vty, struct ospf *ospf, int argc,
       if (use_json)
         json_object_int_add(json, "ospfInstance", ospf->instance);
       else
-        vty_out (vty, "%sOSPF Instance: %d%s%s", VTYNL, ospf->instance,
+        vty_out (vty, "\nOSPF Instance: %d%s%s", ospf->instance,
                  VTYNL, VTYNL);
     }
 
@@ -3622,8 +3621,7 @@ DEFUN (show_ip_ospf_instance_interface,
 static void
 show_ip_ospf_neighbour_header (struct vty *vty)
 {
-  vty_out (vty, "%s%-15s %3s %-15s %9s %-15s %-20s %5s %5s %5s%s",
-           VTYNL,
+  vty_out (vty, "\n%-15s %3s %-15s %9s %-15s %-20s %5s %5s %5s%s",
            "Neighbor ID", "Pri", "State", "Dead Time",
            "Address", "Interface", "RXmtL", "RqstL", "DBsmL",
            VTYNL);
@@ -3715,7 +3713,7 @@ show_ip_ospf_neighbor_common (struct vty *vty, struct ospf *ospf, u_char use_jso
       if (use_json)
         json_object_int_add(json, "ospfInstance", ospf->instance);
       else
-        vty_out (vty, "%sOSPF Instance: %d%s%s", VTYNL, ospf->instance,
+        vty_out (vty, "\nOSPF Instance: %d%s%s", ospf->instance,
                  VTYNL, VTYNL);
     }
 
@@ -3795,7 +3793,7 @@ show_ip_ospf_neighbor_all_common (struct vty *vty, struct ospf *ospf, u_char use
       if (use_json)
         json_object_int_add(json, "ospfInstance", ospf->instance);
       else
-        vty_out (vty, "%sOSPF Instance: %d%s%s", VTYNL, ospf->instance,
+        vty_out (vty, "\nOSPF Instance: %d%s%s", ospf->instance,
                  VTYNL, VTYNL);
     }
 
@@ -3905,7 +3903,7 @@ show_ip_ospf_neighbor_int_common (struct vty *vty, struct ospf *ospf, int arg_ba
       if (use_json)
         json_object_int_add(json, "ospfInstance", ospf->instance);
       else
-        vty_out (vty, "%sOSPF Instance: %d%s%s", VTYNL, ospf->instance,
+        vty_out (vty, "\nOSPF Instance: %d%s%s", ospf->instance,
                  VTYNL, VTYNL);
     }
 
@@ -4280,7 +4278,7 @@ show_ip_ospf_neighbor_id_common (struct vty *vty, struct ospf *ospf,
       if (use_json)
         json_object_int_add(json, "ospfInstance", ospf->instance);
       else
-        vty_out (vty, "%sOSPF Instance: %d%s%s", VTYNL, ospf->instance,
+        vty_out (vty, "\nOSPF Instance: %d%s%s", ospf->instance,
                  VTYNL, VTYNL);
     }
 
@@ -4368,7 +4366,7 @@ show_ip_ospf_neighbor_detail_common (struct vty *vty, struct ospf *ospf, u_char
       if (use_json)
         json_object_int_add(json, "ospfInstance", ospf->instance);
       else
-        vty_out (vty, "%sOSPF Instance: %d%s%s", VTYNL, ospf->instance,
+        vty_out (vty, "\nOSPF Instance: %d%s%s", ospf->instance,
                  VTYNL, VTYNL);
     }
 
@@ -4460,7 +4458,7 @@ show_ip_ospf_neighbor_detail_all_common (struct vty *vty, struct ospf *ospf, u_c
       if (use_json)
         json_object_int_add(json, "ospfInstance", ospf->instance);
       else
-        vty_out (vty, "%sOSPF Instance: %d%s%s", VTYNL, ospf->instance,
+        vty_out (vty, "\nOSPF Instance: %d%s%s", ospf->instance,
                  VTYNL, VTYNL);
     }
 
@@ -4563,7 +4561,7 @@ show_ip_ospf_neighbor_int_detail_common (struct vty *vty, struct ospf *ospf,
       if (use_json)
         json_object_int_add(json, "ospfInstance", ospf->instance);
       else
-        vty_out (vty, "%sOSPF Instance: %d%s%s", VTYNL, ospf->instance,
+        vty_out (vty, "\nOSPF Instance: %d%s%s", ospf->instance,
                  VTYNL, VTYNL);
     }
 
@@ -5099,8 +5097,7 @@ show_lsa_detail (struct vty *vty, struct ospf *ospf, int type,
     default:
       for (ALL_LIST_ELEMENTS_RO (ospf->areas, node, area))
         {
-          vty_out (vty, "%s                %s (Area %s)%s%s",
-                   VTYNL, show_database_desc[type],
+          vty_out (vty, "\n                %s (Area %s)%s%s", show_database_desc[type],
                    ospf_area_desc_string (area), VTYNL, VTYNL);
           show_lsa_detail_proc (vty, AREA_LSDB (area, type), id, adv_router);
         }
@@ -5147,8 +5144,7 @@ show_lsa_detail_adv_router (struct vty *vty, struct ospf *ospf, int type,
     default:
       for (ALL_LIST_ELEMENTS_RO (ospf->areas, node, area))
         {
-          vty_out (vty, "%s                %s (Area %s)%s%s",
-                   VTYNL, show_database_desc[type],
+          vty_out (vty, "\n                %s (Area %s)%s%s", show_database_desc[type],
                    ospf_area_desc_string (area), VTYNL, VTYNL);
           show_lsa_detail_adv_router_proc (vty, AREA_LSDB (area, type),
                                            adv_router);
@@ -5229,8 +5225,7 @@ show_ip_ospf_database_maxage (struct vty *vty, struct ospf *ospf)
 {
   struct route_node *rn;
 
-  vty_out (vty, "%s                MaxAge Link States:%s%s",
-           VTYNL, VTYNL, VTYNL);
+  vty_out (vty, "\n                MaxAge Link States:\n\n");
 
   for (rn = route_top (ospf->maxage_lsa); rn; rn = route_next (rn))
     {
@@ -5277,10 +5272,10 @@ show_ip_ospf_database_common (struct vty *vty, struct ospf *ospf,
   struct in_addr id, adv_router;
 
   if (ospf->instance)
-    vty_out (vty, "%sOSPF Instance: %d%s", VTYNL, ospf->instance,
+    vty_out (vty, "\nOSPF Instance: %d%s", ospf->instance,
              VTYNL);
 
-  vty_out (vty, "%s       OSPF Router with ID (%s)%s%s", VTYNL,
+  vty_out (vty, "\n       OSPF Router with ID (%s)%s%s",
            inet_ntoa (ospf->router_id), VTYNL, VTYNL);
 
   /* Show all LSA. */
@@ -5436,10 +5431,10 @@ show_ip_ospf_database_type_adv_router_common (struct vty *vty, struct ospf *ospf
   struct in_addr adv_router;
 
   if (ospf->instance)
-    vty_out (vty, "%sOSPF Instance: %d%s", VTYNL, ospf->instance,
+    vty_out (vty, "\nOSPF Instance: %d%s", ospf->instance,
              VTYNL);
 
-  vty_out (vty, "%s       OSPF Router with ID (%s)%s%s", VTYNL,
+  vty_out (vty, "\n       OSPF Router with ID (%s)%s%s",
            inet_ntoa (ospf->router_id), VTYNL, VTYNL);
 
   /* Set database type to show. */
@@ -6952,8 +6947,7 @@ DEFUN (ip_ospf_area,
   if (OSPF_IF_PARAM_CONFIGURED(params, if_area))
     {
       vty_out (vty,
-               "Must remove previous area config before changing ospf area %s",
-               VTYNL);
+               "Must remove previous area config before changing ospf area \n");
       return CMD_WARNING;
     }
 
@@ -7982,7 +7976,7 @@ static int
 show_ip_ospf_border_routers_common (struct vty *vty, struct ospf *ospf)
 {
   if (ospf->instance)
-    vty_out (vty, "%sOSPF Instance: %d%s%s", VTYNL, ospf->instance,
+    vty_out (vty, "\nOSPF Instance: %d%s%s", ospf->instance,
              VTYNL, VTYNL);
 
   if (ospf->new_table == NULL)
@@ -8042,7 +8036,7 @@ static int
 show_ip_ospf_route_common (struct vty *vty, struct ospf *ospf)
 {
   if (ospf->instance)
-    vty_out (vty, "%sOSPF Instance: %d%s%s", VTYNL, ospf->instance,
+    vty_out (vty, "\nOSPF Instance: %d%s%s", ospf->instance,
              VTYNL, VTYNL);
 
   if (ospf->new_table == NULL)
index a69e617b4455b99e30a2ac7d27ae20fc4d53e685..4bc367e4080ade709ef7b9fdfa1b560a34912865 100644 (file)
@@ -1572,8 +1572,7 @@ pim_show_state(struct vty *vty, const char *src_or_group, const char *group, u_c
     json = json_object_new_object();
   } else {
     vty_out(vty, "Codes: J -> Pim Join, I -> IGMP Report, S -> Source, * -> Inherited from (*,G)");
-    vty_out (vty, "%sInstalled Source           Group            IIF      OIL\n",
-              VTYNL);
+    vty_out (vty, "\nInstalled Source           Group            IIF      OIL\n");
   }
 
   for (ALL_LIST_ELEMENTS_RO(pim_channel_oil_list, node, c_oil)) {
index 02606b88a927d2054cf14fb5a48495161e919f8f..fe84e7ecb11db2bd4c054ad9dd5c21ffce6d0536 100644 (file)
@@ -2529,7 +2529,7 @@ DEFUN (vtysh_write_terminal,
     fp = stdout;
 
   vty_out (vty, "Building configuration...\n");
-  vty_out (vty, "%sCurrent configuration:\n",VTYNL);
+  vty_out (vty, "\nCurrent configuration:\n");
   vty_out (vty, "!\n");
 
   for (i = 0; i < array_size(vtysh_client); i++)
index 550f6fc2473c44de5a1b8b32fe6d0e96111d3401..171dcf69c681351047a3380d0e36a690ffdfc2d0 100644 (file)
@@ -1077,7 +1077,7 @@ if_dump_vty (struct vty *vty, struct interface *ifp)
           ifp->ifindex, ifp->metric, ifp->mtu, ifp->speed);
   if (ifp->mtu6 != ifp->mtu)
     vty_out (vty, "mtu6 %d ", ifp->mtu6);
-  vty_out (vty, "%s  flags: %s\n", VTYNL,
+  vty_out (vty, "\n  flags: %s\n",
            if_flag_dump(ifp->flags));
   
   /* Hardware address. */
@@ -1458,7 +1458,7 @@ DEFUN (show_interface_desc_vrf_all,
   RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)
     if (!list_isempty (vrf->iflist))
       {
-        vty_out (vty, "%s\tVRF %u%s\n", VTYNL, vrf->vrf_id,
+        vty_out (vty, "\n\tVRF %u%s\n", vrf->vrf_id,
                 VTYNL);
         if_show_description (vty, vrf->vrf_id);
       }
index b765b51b936670634f07cfe25c448ea4d60579c7..a6d022dd59e88ce00fcd0cffefe02b88f6499512 100644 (file)
@@ -1451,7 +1451,7 @@ zfpm_show_stats (struct vty *vty)
   zfpm_stats_t total_stats;
   time_t elapsed;
 
-  vty_out (vty, "%s%-40s %10s     Last %2d secs%s\n", VTYNL, "Counter",
+  vty_out (vty, "\n%-40s %10s     Last %2d secs%s\n", "Counter",
           "Total", ZFPM_STATS_IVL_SECS, VTYNL);
 
   /*
@@ -1490,7 +1490,7 @@ zfpm_show_stats (struct vty *vty)
 
   elapsed = zfpm_get_elapsed_time (zfpm_g->last_stats_clear_time);
 
-  vty_out (vty, "%sStats were cleared %lu seconds ago\n", VTYNL,
+  vty_out (vty, "\nStats were cleared %lu seconds ago\n",
           (unsigned long)elapsed);
 }
 
index 0dad125d14534adb25caef87a6dc24b7653e079d..6e4c1b18504c4f7c700c770adf6491a01dbfa2b7 100644 (file)
@@ -1183,7 +1183,7 @@ do_show_ip_route (struct vty *vty, const char *vrf_name, afi_t afi, safi_t safi,
                     vty_out (vty, SHOW_ROUTE_V6_HEADER);
 
                   if (zvrf_id (zvrf) != VRF_DEFAULT)
-                    vty_out (vty, "%sVRF %s:\n", VTYNL,
+                    vty_out (vty, "\nVRF %s:\n",
                                zvrf_name(zvrf));
 
                   first = 0;
@@ -1244,7 +1244,7 @@ DEFUN (show_ip_nht_vrf_all,
   RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)
     if ((zvrf = vrf->info) != NULL)
       {
-        vty_out (vty, "%sVRF %s:\n", VTYNL, zvrf_name(zvrf));
+        vty_out (vty, "\nVRF %s:\n", zvrf_name(zvrf));
         zebra_print_rnh_table(zvrf_id (zvrf), AF_INET, vty, RNH_NEXTHOP_TYPE);
       }
 
@@ -1284,7 +1284,7 @@ DEFUN (show_ipv6_nht_vrf_all,
   RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)
     if ((zvrf = vrf->info) != NULL)
       {
-        vty_out (vty, "%sVRF %s:\n", VTYNL, zvrf_name(zvrf));
+        vty_out (vty, "\nVRF %s:\n", zvrf_name(zvrf));
         zebra_print_rnh_table(zvrf_id (zvrf), AF_INET6, vty, RNH_NEXTHOP_TYPE);
       }