summaryrefslogtreecommitdiffstats
path: root/freebsd/sbin
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-11-12 09:40:54 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-11-13 14:10:35 +0100
commitb4d6afd9f61013705b8b6cc9cb9998ee9fed451e (patch)
tree4e73facbd20d9f22ae900adcbbf3796bb03a449f /freebsd/sbin
parentNETISR(9): Fix NULL pointer access (diff)
downloadrtems-libbsd-b4d6afd9f61013705b8b6cc9cb9998ee9fed451e.tar.bz2
commands: Use REQUIRE_ORDER option processing
Diffstat (limited to 'freebsd/sbin')
-rw-r--r--freebsd/sbin/ifconfig/ifconfig.c4
-rw-r--r--freebsd/sbin/ping/ping.c2
-rw-r--r--freebsd/sbin/ping6/ping6.c2
-rw-r--r--freebsd/sbin/route/route.c2
4 files changed, 7 insertions, 3 deletions
diff --git a/freebsd/sbin/ifconfig/ifconfig.c b/freebsd/sbin/ifconfig/ifconfig.c
index 6c7b8a36..43b8ea42 100644
--- a/freebsd/sbin/ifconfig/ifconfig.c
+++ b/freebsd/sbin/ifconfig/ifconfig.c
@@ -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) {
diff --git a/freebsd/sbin/ping/ping.c b/freebsd/sbin/ping/ping.c
index b45efa6b..f64245cf 100644
--- a/freebsd/sbin/ping/ping.c
+++ b/freebsd/sbin/ping/ping.c
@@ -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;
diff --git a/freebsd/sbin/ping6/ping6.c b/freebsd/sbin/ping6/ping6.c
index b2ad6336..9553890c 100644
--- a/freebsd/sbin/ping6/ping6.c
+++ b/freebsd/sbin/ping6/ping6.c
@@ -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 */
diff --git a/freebsd/sbin/route/route.c b/freebsd/sbin/route/route.c
index cc5c7d05..1e095898 100644
--- a/freebsd/sbin/route/route.c
+++ b/freebsd/sbin/route/route.c
@@ -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__