Add some more errno mappings (bsd -> linux) and a comment about the status..

Submitted by:	"Intron" <mag@intron.ac>
This commit is contained in:
Alexander Leidinger 2006-08-10 22:05:25 +00:00
parent 6fa630da42
commit 50e422f056
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=161204
2 changed files with 12 additions and 2 deletions

View file

@ -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] = {

View file

@ -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] = {