diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2017-07-13 17:49:13 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2017-07-13 20:29:22 +0200 |
commit | 5c7571d43f57317b0827ac82fbebc4cdc6865be0 (patch) | |
tree | 2bc63ccbd805abc9689e9f3345e34871558d5c26 /lib/thread.c | |
parent | lib: move \n vs. \r\n handling into vty code (diff) | |
download | frr-5c7571d43f57317b0827ac82fbebc4cdc6865be0.tar.xz frr-5c7571d43f57317b0827ac82fbebc4cdc6865be0.zip |
*: ditch vty_outln(), part 1 of 2
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/thread.c')
-rw-r--r-- | lib/thread.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/thread.c b/lib/thread.c index 4e72d4c96..e59d68b0e 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -95,7 +95,7 @@ vty_out_cpu_thread_history(struct vty* vty, a->total_active, a->cpu.total/1000, a->cpu.total%1000, a->total_calls, a->cpu.total/a->total_calls, a->cpu.max, a->real.total/a->total_calls, a->real.max); - vty_outln (vty, " %c%c%c%c%c %s", + vty_out (vty, " %c%c%c%c%c %s\n", a->types & (1 << THREAD_READ) ? 'R':' ', a->types & (1 << THREAD_WRITE) ? 'W':' ', a->types & (1 << THREAD_TIMER) ? 'T':' ', @@ -148,12 +148,12 @@ cpu_record_print(struct vty *vty, thread_type filter) underline[sizeof(underline)] = '\0'; vty_out (vty, VTYNL); - vty_outln(vty, "Showing statistics for pthread %s", name); - vty_outln(vty, "-------------------------------%s", underline); - vty_outln(vty, "%21s %18s %18s", "", "CPU (user+system):", "Real (wall-clock):"); + vty_out(vty, "Showing statistics for pthread %s\n", name); + vty_out(vty, "-------------------------------%s\n", underline); + vty_out(vty, "%21s %18s %18s\n", "", "CPU (user+system):", "Real (wall-clock):"); vty_out(vty, "Active Runtime(ms) Invoked Avg uSec Max uSecs"); vty_out(vty, " Avg uSec Max uSecs"); - vty_outln(vty, " Type Thread"); + vty_out(vty, " Type Thread\n"); if (m->cpu_record->count) hash_iterate(m->cpu_record, @@ -161,7 +161,7 @@ cpu_record_print(struct vty *vty, thread_type filter) cpu_record_hash_print, args); else - vty_outln(vty, "No data to display yet."); + vty_out(vty, "No data to display yet.\n"); vty_out(vty, VTYNL); } @@ -169,12 +169,12 @@ cpu_record_print(struct vty *vty, thread_type filter) pthread_mutex_unlock (&masters_mtx); vty_out(vty, VTYNL); - vty_outln(vty, "Total thread statistics"); - vty_outln(vty, "-------------------------"); - vty_outln(vty, "%21s %18s %18s", "", "CPU (user+system):", "Real (wall-clock):"); + vty_out(vty, "Total thread statistics\n"); + vty_out(vty, "-------------------------\n"); + vty_out(vty, "%21s %18s %18s\n", "", "CPU (user+system):", "Real (wall-clock):"); vty_out(vty, "Active Runtime(ms) Invoked Avg uSec Max uSecs"); vty_out(vty, " Avg uSec Max uSecs"); - vty_outln(vty, " Type Thread"); + vty_out(vty, " Type Thread\n"); if (tmp.total_calls > 0) vty_out_cpu_thread_history(vty, &tmp); |