diff --git a/Makefile b/Makefile index b05f7fb1..d267920f 100644 --- a/Makefile +++ b/Makefile @@ -56,6 +56,7 @@ C_FILES += rtemsbsd/src/rtems-bsd-timeout.c C_FILES += rtemsbsd/src/rtems-bsd-timesupport.c C_FILES += rtemsbsd/src/rtems-bsd-newproc.c C_FILES += rtemsbsd/src/rtems-bsd-vm_glue.c +C_FILES += rtemsbsd/src/rtems-bsd-copyinout.c C_FILES += freebsd/kern/subr_eventhandler.c C_FILES += freebsd/kern/kern_subr.c C_FILES += freebsd/kern/kern_tc.c diff --git a/freebsd-to-rtems.py b/freebsd-to-rtems.py index e01bf903..3cc7fddc 100755 --- a/freebsd-to-rtems.py +++ b/freebsd-to-rtems.py @@ -551,6 +551,7 @@ rtems.addRTEMSSourceFiles( 'src/rtems-bsd-timesupport.c', 'src/rtems-bsd-newproc.c', 'src/rtems-bsd-vm_glue.c', + 'src/rtems-bsd-copyinout.c', ] ) rtems.addEmptyHeaderFiles( diff --git a/rtemsbsd/src/rtems-bsd-copyinout.c b/rtemsbsd/src/rtems-bsd-copyinout.c new file mode 100644 index 00000000..49c55abb --- /dev/null +++ b/rtemsbsd/src/rtems-bsd-copyinout.c @@ -0,0 +1,31 @@ +/** + * @file + * + * @ingroup rtems_bsd_rtems + * + * @brief This file contains the RTEMS implementation of the bsd functions + * from the copyinout.c file. + */ + +/* + * COPYRIGHT (c) 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 +#include +#include + +int +copyinstr(const void *udaddr, void *kaddr, size_t len, size_t *done) +{ + memcpy(kaddr, udaddr, len); + *done = len; + return 0; +}