commands: Use REQUIRE_ORDER option processing

This commit is contained in:
Sebastian Huber 2013-11-12 09:40:54 +01:00
parent 760e894d54
commit b4d6afd9f6
5 changed files with 8 additions and 4 deletions

View File

@ -214,7 +214,11 @@ main(int argc, char *argv[])
all = downonly = uponly = namesonly = noload = verbose = 0;
/* Parse leading line options */
#ifndef __rtems__
strlcpy(options, "adklmnuv", sizeof(options));
#else /* __rtems__ */
strlcpy(options, "+adklmnuv", sizeof(options));
#endif /* __rtems__ */
for (p = opts; p != NULL; p = p->next)
strlcat(options, p->opt, sizeof(options));
while ((c = getopt(argc, argv, options)) != -1) {

View File

@ -316,7 +316,7 @@ main(int argc, char **argv)
#define optarg getopt_data.optarg
#define opterr getopt_data.opterr
#define optopt getopt_data.optopt
#define getopt(argc, argv, opt) getopt_r(argc, argv, opt, &getopt_data)
#define getopt(argc, argv, opt) getopt_r(argc, argv, "+" opt, &getopt_data)
#endif /* __rtems__ */
payload = source = NULL;

View File

@ -403,7 +403,7 @@ main(int argc, char *argv[])
#define optarg getopt_data.optarg
#define opterr getopt_data.opterr
#define optopt getopt_data.optopt
#define getopt(argc, argv, opt) getopt_r(argc, argv, opt, &getopt_data)
#define getopt(argc, argv, opt) getopt_r(argc, argv, "+" opt, &getopt_data)
#endif /* __rtems__ */
/* just to be sure */

View File

@ -251,7 +251,7 @@ main(int argc, char **argv)
#define optarg getopt_data.optarg
#define opterr getopt_data.opterr
#define optopt getopt_data.optopt
#define getopt(argc, argv, opt) getopt_r(argc, argv, opt, &getopt_data)
#define getopt(argc, argv, opt) getopt_r(argc, argv, "+" opt, &getopt_data)
#endif /* __rtems__ */
#ifndef __rtems__

View File

@ -436,7 +436,7 @@ main(int argc, char *argv[])
#define optarg getopt_data.optarg
#define opterr getopt_data.opterr
#define optopt getopt_data.optopt
#define getopt(argc, argv, opt) getopt_r(argc, argv, opt, &getopt_data)
#define getopt(argc, argv, opt) getopt_r(argc, argv, "+" opt, &getopt_data)
#endif /* __rtems__ */
af = AF_UNSPEC;