aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2022-06-27 11:23:39 +0100
committerRon Yorston <rmy@pobox.com>2022-06-27 11:23:39 +0100
commitb0f279a48f5f7e57b6f6e941e4b59e9a1bc54548 (patch)
tree86430f2929d8e3eb162bcb83c512bf8a0fffe322 /procps
parent164a4253b1b16f3923b175f425074ef2d1b04377 (diff)
parent2617a5e4c600b4577b2c18f794701276e55da43b (diff)
downloadbusybox-w32-b0f279a48f5f7e57b6f6e941e4b59e9a1bc54548.tar.gz
busybox-w32-b0f279a48f5f7e57b6f6e941e4b59e9a1bc54548.tar.bz2
busybox-w32-b0f279a48f5f7e57b6f6e941e4b59e9a1bc54548.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'procps')
-rw-r--r--procps/top.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/procps/top.c b/procps/top.c
index 744f20e9b..ff775422c 100644
--- a/procps/top.c
+++ b/procps/top.c
@@ -879,8 +879,11 @@ static NOINLINE void display_topmem_process_list(int lines_rem, int scr_width)
879 lines_rem = ntop - G_scroll_ofs; 879 lines_rem = ntop - G_scroll_ofs;
880 while (--lines_rem >= 0) { 880 while (--lines_rem >= 0) {
881 /* PID VSZ VSZRW RSS (SHR) DIRTY (SHR) COMMAND */ 881 /* PID VSZ VSZRW RSS (SHR) DIRTY (SHR) COMMAND */
882 ulltoa6_and_space(s->pid , &line_buf[0*6]); 882 int n = sprintf(line_buf, "%5u ", s->pid);
883 ulltoa6_and_space(s->vsz , &line_buf[1*6]); 883 ulltoa6_and_space(s->vsz , &line_buf[1*6]);
884 if (n > 7 || (n == 7 && line_buf[6] != ' '))
885 /* PID and VSZ are clumped together, truncate PID */
886 line_buf[5] = '.';
884 ulltoa6_and_space(s->vszrw , &line_buf[2*6]); 887 ulltoa6_and_space(s->vszrw , &line_buf[2*6]);
885 ulltoa6_and_space(s->rss , &line_buf[3*6]); 888 ulltoa6_and_space(s->rss , &line_buf[3*6]);
886 ulltoa6_and_space(s->rss_sh , &line_buf[4*6]); 889 ulltoa6_and_space(s->rss_sh , &line_buf[4*6]);