[rtems-libbsd commit] Added an RTEMS specific version of routines needed from copyinout.c
Jennifer Averett
jennifer at rtems.org
Wed Apr 18 16:57:39 UTC 2012
Module: rtems-libbsd
Branch: master
Commit: fdd321cb3e97872458cadda58d66bc3da5ca6880
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=fdd321cb3e97872458cadda58d66bc3da5ca6880
Author: Jennifer Averett <jennifer.averett at oarcorp.com>
Date: Wed Apr 18 12:00:33 2012 -0500
Added an RTEMS specific version of routines needed from copyinout.c
---
Makefile | 1 +
freebsd-to-rtems.py | 1 +
rtemsbsd/src/rtems-bsd-copyinout.c | 31 +++++++++++++++++++++++++++++++
3 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index b05f7fb..d267920 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 e01bf90..3cc7fdd 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 0000000..49c55ab
--- /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;
+}
More information about the vc
mailing list