vlib: add show trace limit warning at the end of output too 59/29259/2
authorBenoît Ganne <bganne@cisco.com>
Mon, 5 Oct 2020 12:55:00 +0000 (14:55 +0200)
committerDave Barach <openvpp@barachs.net>
Mon, 25 Jan 2021 12:12:02 +0000 (12:12 +0000)
Users tend to miss the warning too often, add it to the end of the
output in hope it would be easier to catch.

Type: improvement

Change-Id: I264df7e3b6ab1ffb1a383807f4444d9cbaf40999
Signed-off-by: Benoît Ganne <bganne@cisco.com>
src/vlib/trace.c

index 156378a..836e8b4 100644 (file)
@@ -338,8 +338,10 @@ cli_show_trace_buffer (vlib_main_t * vm,
       {
         if (i == max)
           {
-            vlib_cli_output (vm, "Limiting display to %d packets."
-                                 " To display more specify max.", max);
+            char *warn = "Limiting display to %d packets."
+                               " To display more specify max.";
+            vlib_cli_output (vm, warn, max);
+            s = format (s, warn, max);
             goto done;
           }