Added log and prison methods to resolve linker errors for RealTek Nic.

This commit is contained in:
Jennifer Averett 2012-03-28 11:40:08 -05:00
parent 336762e7b2
commit d1528ff313
4 changed files with 51 additions and 0 deletions

View File

@ -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 \

View File

@ -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',

View File

@ -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.
*

View File

@ -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);
}