aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-12-30 17:57:03 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-12-30 17:57:03 +0000
commit3bba545a54addf59b63a003e7ada03fd8b29b5ba (patch)
tree948ce196f871abcf9410ca1521a3d2a5af6a3082 /procps
parentb5a122b6f9643fb052d31390e435397960289154 (diff)
downloadbusybox-3bba545a54addf59b63a003e7ada03fd8b29b5ba.tar.gz
done a dozen of randconfig test. guess what? ALL failed...
these are resulting fixes
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 8d732d4b2..d1fbfe6e1 100644
--- a/procps/top.c
+++ b/procps/top.c
@@ -50,12 +50,13 @@ struct save_hist {
unsigned long ticks;
unsigned pid;
};
+#if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
static struct save_hist *prev_hist;
static int prev_hist_count;
/* static int hist_iterations; */
static unsigned total_pcpu;
/* static unsigned long total_rss; */
-
+#endif
#define OPT_BATCH_MODE (option_mask32 & 0x4)
@@ -485,7 +486,9 @@ int top_main(int argc, char **argv)
top[n].pid = p->pid;
top[n].ppid = p->ppid;
top[n].rss = p->rss;
+#if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
top[n].ticks = p->stime + p->utime;
+#endif
top[n].uid = p->uid;
strcpy(top[n].state, p->state);
strcpy(top[n].comm, p->comm);