svn commit: trunk/busybox/procps

landley at busybox.net landley at busybox.net
Thu May 4 19:51:37 UTC 2006


Author: landley
Date: 2006-05-04 12:51:22 -0700 (Thu, 04 May 2006)
New Revision: 14996

Log:
Fix allbareconfig.


Modified:
   trunk/busybox/procps/top.c


Changeset:
Modified: trunk/busybox/procps/top.c
===================================================================
--- trunk/busybox/procps/top.c	2006-05-04 15:18:05 UTC (rev 14995)
+++ trunk/busybox/procps/top.c	2006-05-04 19:51:22 UTC (rev 14996)
@@ -343,18 +343,12 @@
 			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, 




More information about the busybox-cvs mailing list