summaryrefslogtreecommitdiff
path: root/lib/thread.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2017-06-21 03:10:57 +0000
committerQuentin Young <qlyoung@cumulusnetworks.com>2017-06-29 17:31:28 +0000
commit96ade3ed7716c89b8047a1c0ab3377985d461cf8 (patch)
tree1c3061738c2c0027612b6cdb3e5d5eccb08587bf /lib/thread.c
parent4d5f445750e01467898eee47796e80d808500d56 (diff)
*: use vty_outln
Saves 400 lines Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/thread.c')
-rw-r--r--lib/thread.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/thread.c b/lib/thread.c
index 02108bc6bd..a1a9e7c359 100644
--- a/lib/thread.c
+++ b/lib/thread.c
@@ -96,13 +96,13 @@ 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_out(vty, " %c%c%c%c%c %s%s",
+ vty_outln (vty, " %c%c%c%c%c %s",
a->types & (1 << THREAD_READ) ? 'R':' ',
a->types & (1 << THREAD_WRITE) ? 'W':' ',
a->types & (1 << THREAD_TIMER) ? 'T':' ',
a->types & (1 << THREAD_EVENT) ? 'E':' ',
a->types & (1 << THREAD_EXECUTE) ? 'X':' ',
- a->funcname, VTY_NEWLINE);
+ a->funcname);
}
static void
@@ -137,11 +137,11 @@ cpu_record_print(struct vty *vty, thread_type filter)
tmp.funcname = "TOTAL";
tmp.types = filter;
- vty_out(vty, "%21s %18s %18s%s",
- "", "CPU (user+system):", "Real (wall-clock):", VTY_NEWLINE);
+ vty_outln (vty, "%21s %18s %18s",
+ "", "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_out(vty, " Type Thread%s", VTY_NEWLINE);
+ vty_outln (vty, " Type Thread");
pthread_mutex_lock (&cpu_record_mtx);
{
@@ -201,9 +201,9 @@ DEFUN (show_thread_cpu,
}
if (filter == 0)
{
- vty_out(vty, "Invalid filter \"%s\" specified,"
- " must contain at least one of 'RWTEXB'%s",
- argv[idx_filter]->arg, VTY_NEWLINE);
+ vty_outln (vty, "Invalid filter \"%s\" specified,"
+ " must contain at least one of 'RWTEXB'",
+ argv[idx_filter]->arg);
return CMD_WARNING;
}
}
@@ -289,9 +289,9 @@ DEFUN (clear_thread_cpu,
}
if (filter == 0)
{
- vty_out(vty, "Invalid filter \"%s\" specified,"
- " must contain at least one of 'RWTEXB'%s",
- argv[idx_filter]->arg, VTY_NEWLINE);
+ vty_outln (vty, "Invalid filter \"%s\" specified,"
+ " must contain at least one of 'RWTEXB'",
+ argv[idx_filter]->arg);
return CMD_WARNING;
}
}