From 3bba545a54addf59b63a003e7ada03fd8b29b5ba Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sat, 30 Dec 2006 17:57:03 +0000 Subject: done a dozen of randconfig test. guess what? ALL failed... these are resulting fixes --- procps/top.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'procps') diff --git a/procps/top.c b/procps/top.c index 8d732d4..d1fbfe6 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); -- cgit v1.1