diff --git a/Makefile b/Makefile index 95f67ad3..ef2e6e5c 100644 --- a/Makefile +++ b/Makefile @@ -354,6 +354,7 @@ C_FILES += \ rtemsbsd/src/rtems-bsd-thread.c \ rtemsbsd/src/rtems-bsd-condvar.c \ rtemsbsd/src/rtems-bsd-lock.c \ + rtemsbsd/src/rtems-bsd-log.c \ rtemsbsd/src/rtems-bsd-sx.c \ rtemsbsd/src/rtems-bsd-rmlock.c \ rtemsbsd/src/rtems-bsd-rwlock.c \ diff --git a/freebsd-to-rtems.py b/freebsd-to-rtems.py index a115a998..1f57fbed 100755 --- a/freebsd-to-rtems.py +++ b/freebsd-to-rtems.py @@ -502,6 +502,7 @@ rtems_sourceFiles = [ 'src/rtems-bsd-thread.c', 'src/rtems-bsd-condvar.c', 'src/rtems-bsd-lock.c', + 'src/rtems-bsd-log.c', 'src/rtems-bsd-sx.c', 'src/rtems-bsd-rmlock.c', 'src/rtems-bsd-rwlock.c', 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 @@ -146,6 +146,19 @@ prison_equal_ip4(struct prison *pr1, struct prison *pr2) return 1; } +/* + * 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. * 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 +#include + +/* + * 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); +} +