summaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
authorRob Landley2006-05-04 19:51:22 +0000
committerRob Landley2006-05-04 19:51:22 +0000
commit0c43046fdeee696491d5d3c89760ae98416f9505 (patch)
tree17203a030fa4710de03cd7a5aee26b8161490469 /procps
parent3916b2a560cadab2a6e97aff0d170ec4de88f0ab (diff)
downloadbusybox-0c43046fdeee696491d5d3c89760ae98416f9505.zip
busybox-0c43046fdeee696491d5d3c89760ae98416f9505.tar.gz
Fix allbareconfig.
Diffstat (limited to 'procps')
-rw-r--r--procps/top.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/procps/top.c b/procps/top.c
index a8728df..2dd1719 100644
--- a/procps/top.c
+++ b/procps/top.c
@@ -343,18 +343,12 @@ static void display_status(int count, int scr_width)
sprintf(rss_str_buf, "%6ldM", s->rss/1024);
else
sprintf(rss_str_buf, "%7ld", s->rss);
-#ifdef CONFIG_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%3u.%c ",
+ 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" \
+ USE_FEATURE_TOP_CPU_USAGE_PERCENTAGE("%3u.%c") " ",
s->pid, s->user, s->state, rss_str_buf, s->ppid,
- 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
+ USE_FEATURE_TOP_CPU_USAGE_PERCENTAGE(pcpu.quot, '0'+pcpu.rem,)
+ pmem.quot, '0'+pmem.rem);
if (col>0)
printf("%.*s", col, s->short_cmd);
/* printf(" %d/%d %lld/%lld", s->pcpu, total_pcpu,