aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-09-29 17:16:39 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-09-29 17:16:39 +0000
commite7e549b50b1fadf24f8d118e299652cf270476d9 (patch)
tree75afe0e05044880298a5ad38a04ad3213f0d2fd3 /libbb
parentbb7b2c3d3cd5cf0a1a3eae5266cecb963b1b1ed1 (diff)
downloadbusybox-w32-e7e549b50b1fadf24f8d118e299652cf270476d9.tar.gz
busybox-w32-e7e549b50b1fadf24f8d118e299652cf270476d9.tar.bz2
busybox-w32-e7e549b50b1fadf24f8d118e299652cf270476d9.zip
top: add support for -b, -n <iterations>
git-svn-id: svn://busybox.net/trunk/busybox@16260 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
-rw-r--r--libbb/getopt_ulflags.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/libbb/getopt_ulflags.c b/libbb/getopt_ulflags.c
index 988f3f9f5..9d27c1f11 100644
--- a/libbb/getopt_ulflags.c
+++ b/libbb/getopt_ulflags.c
@@ -319,9 +319,7 @@ bb_getopt_ulflags(int argc, char **argv, const char *applet_opts, ...)
319 const struct option *l_o; 319 const struct option *l_o;
320#endif 320#endif
321 unsigned long trigger; 321 unsigned long trigger;
322#ifdef CONFIG_PS
323 char **pargv = NULL; 322 char **pargv = NULL;
324#endif
325 int min_arg = 0; 323 int min_arg = 0;
326 int max_arg = -1; 324 int max_arg = -1;
327 325
@@ -461,9 +459,7 @@ bb_getopt_ulflags(int argc, char **argv, const char *applet_opts, ...)
461#else 459#else
462 while ((c = getopt(argc, argv, applet_opts)) >= 0) { 460 while ((c = getopt(argc, argv, applet_opts)) >= 0) {
463#endif /* ENABLE_GETOPT_LONG */ 461#endif /* ENABLE_GETOPT_LONG */
464#if ENABLE_PS
465loop_arg_is_opt: 462loop_arg_is_opt:
466#endif
467 for (on_off = complementally; on_off->opt != c; on_off++) { 463 for (on_off = complementally; on_off->opt != c; on_off++) {
468 /* c==0 if long opt have non NULL flag */ 464 /* c==0 if long opt have non NULL flag */
469 if (on_off->opt == 0 && c != 0) 465 if (on_off->opt == 0 && c != 0)
@@ -485,13 +481,10 @@ loop_arg_is_opt:
485 } else if (on_off->optarg) { 481 } else if (on_off->optarg) {
486 *(char **)(on_off->optarg) = optarg; 482 *(char **)(on_off->optarg) = optarg;
487 } 483 }
488#if ENABLE_PS
489 if (pargv != NULL) 484 if (pargv != NULL)
490 break; 485 break;
491#endif
492 } 486 }
493 487
494#if ENABLE_PS
495 if (spec_flgs & ALL_ARGV_IS_OPTS) { 488 if (spec_flgs & ALL_ARGV_IS_OPTS) {
496 /* process argv is option, for example "ps" applet */ 489 /* process argv is option, for example "ps" applet */
497 if (pargv == NULL) 490 if (pargv == NULL)
@@ -506,7 +499,6 @@ loop_arg_is_opt:
506 } 499 }
507 } 500 }
508 } 501 }
509#endif
510 502
511#if (ENABLE_AR || ENABLE_TAR) && ENABLE_FEATURE_CLEAN_UP 503#if (ENABLE_AR || ENABLE_TAR) && ENABLE_FEATURE_CLEAN_UP
512 if (spec_flgs & FREE_FIRST_ARGV_IS_OPT) 504 if (spec_flgs & FREE_FIRST_ARGV_IS_OPT)