summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJennifer Averett <jennifer.averett@oarcorp.com>2012-04-18 12:00:33 -0500
committerJennifer Averett <jennifer.averett@oarcorp.com>2012-04-18 12:00:33 -0500
commitfdd321cb3e97872458cadda58d66bc3da5ca6880 (patch)
treea622f2ef449f9ad4e031eae2424b9992b3b9f1ef
parentAdd rtems-bsd-timeout.c to Makefile (diff)
downloadrtems-libbsd-fdd321cb3e97872458cadda58d66bc3da5ca6880.tar.bz2
Added an RTEMS specific version of routines needed from copyinout.c
-rw-r--r--Makefile1
-rwxr-xr-xfreebsd-to-rtems.py1
-rw-r--r--rtemsbsd/src/rtems-bsd-copyinout.c31
3 files changed, 33 insertions, 0 deletions
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 <freebsd/machine/rtems-bsd-config.h>
+
+#include <string.h>
+#include <stdio.h>
+#include <rtems.h>
+
+int
+copyinstr(const void *udaddr, void *kaddr, size_t len, size_t *done)
+{
+ memcpy(kaddr, udaddr, len);
+ *done = len;
+ return 0;
+}