mirror of
https://github.com/sheumann/hush.git
synced 2024-09-12 00:55:11 +00:00
Fix allbareconfig.
This commit is contained in:
parent
3916b2a560
commit
0c43046fde
16
procps/top.c
16
procps/top.c
@ -343,18 +343,12 @@ static void display_status(int count, int scr_width)
|
|||||||
sprintf(rss_str_buf, "%6ldM", s->rss/1024);
|
sprintf(rss_str_buf, "%6ldM", s->rss/1024);
|
||||||
else
|
else
|
||||||
sprintf(rss_str_buf, "%7ld", s->rss);
|
sprintf(rss_str_buf, "%7ld", s->rss);
|
||||||
#ifdef CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
|
USE_FEATURE_TOP_CPU_USAGE_PERCENTAGE(div_t pcpu = div((s->pcpu*pcpu_scale) >> pcpu_shift, 10));
|
||||||
{
|
col -= printf("\n%5d %-8s %s %s%6d%3u.%c" \
|
||||||
div_t pcpu = div((s->pcpu*pcpu_scale) >> pcpu_shift, 10);
|
USE_FEATURE_TOP_CPU_USAGE_PERCENTAGE("%3u.%c") " ",
|
||||||
col -= printf("\n%5d %-8s %s %s%6d%3u.%c%3u.%c ",
|
|
||||||
s->pid, s->user, s->state, rss_str_buf, s->ppid,
|
s->pid, s->user, s->state, rss_str_buf, s->ppid,
|
||||||
pcpu.quot, '0'+pcpu.rem, pmem.quot, '0'+pmem.rem);
|
USE_FEATURE_TOP_CPU_USAGE_PERCENTAGE(pcpu.quot, '0'+pcpu.rem,)
|
||||||
}
|
pmem.quot, '0'+pmem.rem);
|
||||||
#else
|
|
||||||
col -= printf("\n%5d %-8s %s %s%6d%3u.%c ",
|
|
||||||
s->pid, s->user, s->state, rss_str_buf, s->ppid,
|
|
||||||
pmem.quot, '0'+pmem.rem););
|
|
||||||
#endif
|
|
||||||
if (col>0)
|
if (col>0)
|
||||||
printf("%.*s", col, s->short_cmd);
|
printf("%.*s", col, s->short_cmd);
|
||||||
/* printf(" %d/%d %lld/%lld", s->pcpu, total_pcpu,
|
/* printf(" %d/%d %lld/%lld", s->pcpu, total_pcpu,
|
||||||
|
Loading…
Reference in New Issue
Block a user