summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Small <csmall@enc.com.au>2011-12-22 23:53:17 +1100
committerCraig Small <csmall@enc.com.au>2011-12-22 23:53:17 +1100
commit46e51c92e615afd18aa70bf35c64c2e659396b7a (patch)
treeb00e7cbdbb7f118cbdd502cebf7685e6e836303f
parente7f0906b580b6f42874d50e92d78c987860f1000 (diff)
downloadprocps-ng-46e51c92e615afd18aa70bf35c64c2e659396b7a.tar.gz
Fixed slabtop -o crash
printw should only be used for ncurses enabled screens, slabtop -o needs to use the standard printf function, as before.
-rw-r--r--slabtop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/slabtop.c b/slabtop.c
index f0f40a1..df3b6cf 100644
--- a/slabtop.c
+++ b/slabtop.c
@@ -351,7 +351,7 @@ int main(int argc, char *argv[])
}
move(0, 0);
- printw(" %-35s: %d / %d (%.1f%%)\n"
+ print_line(" %-35s: %d / %d (%.1f%%)\n"
" %-35s: %d / %d (%.1f%%)\n"
" %-35s: %d / %d (%.1f%%)\n"
" %-35s: %.2fK / %.2fK (%.1f%%)\n"
@@ -379,7 +379,7 @@ int main(int argc, char *argv[])
attron(A_REVERSE);
/* Translation Hint: Please keep alignment of the
* following intact. */
- printw("%-78s\n", _(" OBJS ACTIVE USE OBJ SIZE SLABS OBJ/SLAB CACHE SIZE NAME"));
+ print_line("%-78s\n", _(" OBJS ACTIVE USE OBJ SIZE SLABS OBJ/SLAB CACHE SIZE NAME"));
attroff(A_REVERSE);
curr = slab_list;