summaryrefslogtreecommitdiffstats
path: root/rtemsbsd
diff options
context:
space:
mode:
authorJennifer Averett <jennifer.averett@oarcorp.com>2012-03-28 11:40:08 -0500
committerJennifer Averett <jennifer.averett@oarcorp.com>2012-03-28 11:40:08 -0500
commitd1528ff3135cb5b7110a6d01c83df55b9d1637ce (patch)
tree60959d71a1db5b881c9b2abe4dca204c1dec500c /rtemsbsd
parentRemove dummy symbols in link01 test (diff)
downloadrtems-libbsd-d1528ff3135cb5b7110a6d01c83df55b9d1637ce.tar.bz2
Added log and prison methods to resolve linker errors for RealTek Nic.
Diffstat (limited to 'rtemsbsd')
-rw-r--r--rtemsbsd/src/rtems-bsd-jail.c13
-rw-r--r--rtemsbsd/src/rtems-bsd-log.c36
2 files changed, 49 insertions, 0 deletions
diff --git a/rtemsbsd/src/rtems-bsd-jail.c b/rtemsbsd/src/rtems-bsd-jail.c
index 7f978635..3fad04b8 100644
--- a/rtemsbsd/src/rtems-bsd-jail.c
+++ b/rtemsbsd/src/rtems-bsd-jail.c
@@ -147,6 +147,19 @@ prison_equal_ip4(struct prison *pr1, struct prison *pr2)
}
/*
+ * Check if given address belongs to the jail referenced by cred/prison.
+ *
+ * Returns 0 if jail doesn't restrict IPv4 or if address belongs to jail,
+ * EADDRNOTAVAIL if the address doesn't belong, or EAFNOSUPPORT if the jail
+ * doesn't allow IPv4. Address passed in in NBO.
+ */
+int
+prison_check_ip4(struct ucred *cred, struct in_addr *ia)
+{
+ return 0;
+}
+
+/*
* Assuming 0 means no restrictions.
*
* NOTE: RTEMS does not restrict via a jail so return 0.
diff --git a/rtemsbsd/src/rtems-bsd-log.c b/rtemsbsd/src/rtems-bsd-log.c
new file mode 100644
index 00000000..361b8a7f
--- /dev/null
+++ b/rtemsbsd/src/rtems-bsd-log.c
@@ -0,0 +1,36 @@
+/**
+ * @file
+ *
+ * @ingroup rtems_bsd_rtems
+ *
+ * @brief TODO.
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2012.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ */
+
+#include <fcntl.h>
+#include <stdarg.h>
+
+/*
+ * Log writes to the log buffer, and guarantees not to sleep (so can be
+ * called by interrupt routines). If there is no process reading the
+ * log yet, it writes to the console also.
+ */
+void
+log(int level, const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ printk(fmt, ap);
+ va_end(ap);
+}
+