summaryrefslogtreecommitdiff
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-w32-3bba545a54addf59b63a003e7ada03fd8b29b5ba.tar.gz
busybox-w32-3bba545a54addf59b63a003e7ada03fd8b29b5ba.tar.bz2
busybox-w32-3bba545a54addf59b63a003e7ada03fd8b29b5ba.zip
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 {
50 unsigned long ticks; 50 unsigned long ticks;
51 unsigned pid; 51 unsigned pid;
52}; 52};
53#if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
53static struct save_hist *prev_hist; 54static struct save_hist *prev_hist;
54static int prev_hist_count; 55static int prev_hist_count;
55/* static int hist_iterations; */ 56/* static int hist_iterations; */
56static unsigned total_pcpu; 57static unsigned total_pcpu;
57/* static unsigned long total_rss; */ 58/* static unsigned long total_rss; */
58 59#endif
59 60
60#define OPT_BATCH_MODE (option_mask32 & 0x4) 61#define OPT_BATCH_MODE (option_mask32 & 0x4)
61 62
@@ -485,7 +486,9 @@ int top_main(int argc, char **argv)
485 top[n].pid = p->pid; 486 top[n].pid = p->pid;
486 top[n].ppid = p->ppid; 487 top[n].ppid = p->ppid;
487 top[n].rss = p->rss; 488 top[n].rss = p->rss;
489#if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
488 top[n].ticks = p->stime + p->utime; 490 top[n].ticks = p->stime + p->utime;
491#endif
489 top[n].uid = p->uid; 492 top[n].uid = p->uid;
490 strcpy(top[n].state, p->state); 493 strcpy(top[n].state, p->state);
491 strcpy(top[n].comm, p->comm); 494 strcpy(top[n].comm, p->comm);