[rtems-libbsd commit] Added rtems_bsdnet_log_host_address and its initialization to userspace.

Jennifer Averett jennifer at rtems.org
Thu Sep 13 17:03:43 UTC 2012


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

Author:    Jennifer Averett <jennifer.averett at oarcorp.com>
Date:      Thu Sep 13 11:56:22 2012 -0500

Added rtems_bsdnet_log_host_address and its initialization to userspace.

---

 freebsd-userspace/Makefile                        |    1 +
 freebsd-userspace/rtems/rtems-syslog-initialize.c |   21 +++++++++++++++++++++
 2 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/freebsd-userspace/Makefile b/freebsd-userspace/Makefile
index 2670b48..6920061 100644
--- a/freebsd-userspace/Makefile
+++ b/freebsd-userspace/Makefile
@@ -125,6 +125,7 @@ C_FILES += lib/libc/db/mpool/mpool.c
 # RTEMS Specific Files
 # C_FILES += rtems/rtems-net-setup.c
 C_FILES += rtems/syslog.c
+C_FILES += rtems/rtems-syslog-initialize.c
 
 # ping command sources
 C_FILES += commands/sbin/ping/ping.c
diff --git a/freebsd-userspace/rtems/rtems-syslog-initialize.c b/freebsd-userspace/rtems/rtems-syslog-initialize.c
new file mode 100644
index 0000000..c092d26
--- /dev/null
+++ b/freebsd-userspace/rtems/rtems-syslog-initialize.c
@@ -0,0 +1,21 @@
+/*
+ * RTEMS version of syslog initialization
+ */
+
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+
+struct in_addr rtems_bsdnet_log_host_address = {0};
+
+int rtems_syslog_initialize(const char *log_host)
+{
+  struct in_addr *i;
+
+  i = &rtems_bsdnet_log_host_address;
+  
+  if (log_host)
+    i->s_addr = inet_addr(log_host);
+  return 0;
+}




More information about the vc mailing list