]> granicus.if.org Git - procps-ng/commitdiff
Fixed slabtop -o crash
authorCraig Small <csmall@enc.com.au>
Thu, 22 Dec 2011 12:53:17 +0000 (23:53 +1100)
committerCraig Small <csmall@enc.com.au>
Thu, 22 Dec 2011 12:53:17 +0000 (23:53 +1100)
printw should only be used for ncurses enabled screens, slabtop -o needs
to use the standard printf function, as before.

slabtop.c

index f0f40a155911ab5e86d3aa2391f8eaf08f8add86..df3b6cf4ad9273af6bc0fa945f5163dd2ccd4b41 100644 (file)
--- 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;