aboutsummaryrefslogtreecommitdiff
path: root/procps/top.c
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-10-06 09:49:47 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-10-06 09:49:47 +0000
commit0c25765dadfc6f92e0c90f146df6b018025d4c62 (patch)
tree17df4dd427d85319857d9b7882585b3db9ad6994 /procps/top.c
parentc51bc4078de3529829b4ee0c20ed490af680c40d (diff)
downloadbusybox-w32-0c25765dadfc6f92e0c90f146df6b018025d4c62.tar.gz
busybox-w32-0c25765dadfc6f92e0c90f146df6b018025d4c62.tar.bz2
busybox-w32-0c25765dadfc6f92e0c90f146df6b018025d4c62.zip
dnsd fix; option_mask32 added. dnsd needs more love.
git-svn-id: svn://busybox.net/trunk/busybox@16316 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'procps/top.c')
-rw-r--r--procps/top.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/procps/top.c b/procps/top.c
index ebfbcb80c..be1c45faa 100644
--- a/procps/top.c
+++ b/procps/top.c
@@ -34,8 +34,7 @@ typedef int (*cmp_t)(procps_status_t *P, procps_status_t *Q);
34 34
35static procps_status_t *top; /* Hehe */ 35static procps_status_t *top; /* Hehe */
36static int ntop; 36static int ntop;
37static unsigned option_mask; 37#define OPT_BATCH_MODE (option_mask32 & 0x4)
38#define OPT_BATCH_MODE (option_mask & 0x4)
39 38
40#ifdef CONFIG_FEATURE_USE_TERMIOS 39#ifdef CONFIG_FEATURE_USE_TERMIOS
41static int pid_sort(procps_status_t *P, procps_status_t *Q) 40static int pid_sort(procps_status_t *P, procps_status_t *Q)
@@ -398,11 +397,11 @@ int top_main(int argc, char **argv)
398 /* do normal option parsing */ 397 /* do normal option parsing */
399 interval = 5; 398 interval = 5;
400 opt_complementary = "-"; 399 opt_complementary = "-";
401 option_mask = getopt32(argc, argv, "d:n:b", 400 getopt32(argc, argv, "d:n:b",
402 &sinterval, &siterations); 401 &sinterval, &siterations);
403 if (option_mask & 0x1) interval = atoi(sinterval); // -d 402 if (option_mask32 & 0x1) interval = atoi(sinterval); // -d
404 if (option_mask & 0x2) iterations = atoi(siterations); // -n 403 if (option_mask32 & 0x2) iterations = atoi(siterations); // -n
405 //if (option_mask & 0x4) // -b 404 //if (option_mask32 & 0x4) // -b
406 405
407 /* change to /proc */ 406 /* change to /proc */
408 xchdir("/proc"); 407 xchdir("/proc");