[rtems-libbsd commit] ping.c: Add include of port_before. h and rtems shell glue

Joel Sherrill joel at rtems.org
Wed Sep 5 18:11:58 UTC 2012


Module:    rtems-libbsd
Branch:    master
Commit:    3604a2578f13cd0298dd53822eda791e3f38d900
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=3604a2578f13cd0298dd53822eda791e3f38d900

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Wed Sep  5 13:15:40 2012 -0500

ping.c: Add include of port_before.h and rtems shell glue

---

 freebsd-userspace/commands/sbin/ping/ping.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/freebsd-userspace/commands/sbin/ping/ping.c b/freebsd-userspace/commands/sbin/ping/ping.c
index 5dc8414..0ddf4db 100644
--- a/freebsd-userspace/commands/sbin/ping/ping.c
+++ b/freebsd-userspace/commands/sbin/ping/ping.c
@@ -1,4 +1,5 @@
 #ifdef __rtems__
+#include "port_before.h"
 #define __need_getopt_newlib
 #include <getopt.h>
 #endif
@@ -1749,3 +1750,16 @@ usage()
 "            [-z tos] mcast-group");
 	exit(EX_USAGE);
 }
+
+#ifdef __rtems__
+  #include <rtems/shell.h>
+
+  rtems_shell_cmd_t rtems_shell_PING_Command = {
+    "ping",                        /* name */
+    "ping [args]",                 /* usage */
+    "net",                         /* topic */
+    main_ping,                     /* command */
+    NULL,                          /* alias */
+    NULL                           /* next */
+  };
+#endif




More information about the vc mailing list