summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornetchild <netchild@FreeBSD.org>2006-08-10 22:05:25 +0000
committernetchild <netchild@FreeBSD.org>2006-08-10 22:05:25 +0000
commit1f1a93f2abba1f67117aa64624bb67a1f2a7451f (patch)
tree520dcd33705ff7e972f552ec847c777654478d90
parent41719470f94d918d750c7b522846a66bf7dffd23 (diff)
downloadFreeBSD-src-1f1a93f2abba1f67117aa64624bb67a1f2a7451f.zip
FreeBSD-src-1f1a93f2abba1f67117aa64624bb67a1f2a7451f.tar.gz
Add some more errno mappings (bsd -> linux) and a comment about the status..
Submitted by: "Intron" <mag@intron.ac>
-rw-r--r--sys/amd64/linux32/linux32_sysvec.c7
-rw-r--r--sys/i386/linux/linux_sysvec.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c
index 6eec4bd..123c3f6 100644
--- a/sys/amd64/linux32/linux32_sysvec.c
+++ b/sys/amd64/linux32/linux32_sysvec.c
@@ -123,6 +123,10 @@ static void linux32_fixlimits(struct proc *p);
/*
* Linux syscalls return negative errno's, we do positive and map them
+ * Reference:
+ * FreeBSD: src/sys/sys/errno.h
+ * Linux: linux-2.6.17.8/include/asm-generic/errno-base.h
+ * linux-2.6.17.8/include/asm-generic/errno.h
*/
static int bsd_to_linux_errno[ELAST + 1] = {
-0, -1, -2, -3, -4, -5, -6, -7, -8, -9,
@@ -133,7 +137,8 @@ static int bsd_to_linux_errno[ELAST + 1] = {
-100,-101,-102,-103,-104,-105,-106,-107,-108,-109,
-110,-111, -40, -36,-112,-113, -39, -11, -87,-122,
-116, -66, -6, -6, -6, -6, -6, -37, -38, -9,
- -6, -6, -43, -42, -75, -6, -84
+ -6, -6, -43, -42, -75,-125, -84, -95, -16, -74,
+ -72, -67, -71
};
int bsd_to_linux_signal[LINUX_SIGTBLSZ] = {
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c
index 40e6e48..70ebfc1 100644
--- a/sys/i386/linux/linux_sysvec.c
+++ b/sys/i386/linux/linux_sysvec.c
@@ -107,6 +107,10 @@ static void exec_linux_setregs(struct thread *td, u_long entry,
/*
* Linux syscalls return negative errno's, we do positive and map them
+ * Reference:
+ * FreeBSD: src/sys/sys/errno.h
+ * Linux: linux-2.6.17.8/include/asm-generic/errno-base.h
+ * linux-2.6.17.8/include/asm-generic/errno.h
*/
static int bsd_to_linux_errno[ELAST + 1] = {
-0, -1, -2, -3, -4, -5, -6, -7, -8, -9,
@@ -117,7 +121,8 @@ static int bsd_to_linux_errno[ELAST + 1] = {
-100,-101,-102,-103,-104,-105,-106,-107,-108,-109,
-110,-111, -40, -36,-112,-113, -39, -11, -87,-122,
-116, -66, -6, -6, -6, -6, -6, -37, -38, -9,
- -6, -6, -43, -42, -75, -6, -84
+ -6, -6, -43, -42, -75,-125, -84, -95, -16, -74,
+ -72, -67, -71
};
int bsd_to_linux_signal[LINUX_SIGTBLSZ] = {
OpenPOWER on IntegriCloud