Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Aug 2006 21:33:54 +0800
From:      "Intron" <mag@intron.ac>
To:        Alexander Leidinger <Alexander@Leidinger.net>, rdivacky@freebsd.org
Cc:        freebsd-emulation@freebsd.org
Subject:   Please Update errno Mapping Table (BSD -> Linux)
Message-ID:  <courier.44DB35C2.00008645@intron.ac>

next in thread | raw e-mail | index | archive | help
The errno mapping tables in both /sys/i386/linux/linux_sysvec.c
and /sys/amd64/linux32/linux32_sysvec.c need to be updated
so that new FreeBSD error types can be found in them.

If you consider my remark on the table to be useful,
please place it beside the table. The table in remark was
generated by my small script.

/*
  *         Error Number Mapping Table (BSD -> Linux)
  *
  *     0,   -1,   -2,   -3,   -4,   -5,   -6,   -7,   -8,   -9,
  *   -10,  -35,  -12,  -13,  -14,  -15,  -16,  -17,  -18,  -19,
  *   -20,  -21,  -22,  -23,  -24,  -25,  -26,  -27,  -28,  -29,
  *   -30,  -31,  -32,  -33,  -34,  -11, -115, -114,  -88,  -89,
  *   -90,  -91,  -92,  -93,  -94,  -95,  -96,  -97,  -98,  -99,
  *  -100, -101, -102, -103, -104, -105, -106, -107, -108, -109,
  *  -110, -111,  -40,  -36, -112, -113,  -39, NONE,  -87, -122,
  *  -116,  -66, NONE, NONE, NONE, NONE, NONE,  -37,  -38, NONE,
  *  NONE, NONE,  -43,  -42,  -75, -125,  -84, NONE, NONE,  -74,
  *   -72,  -67,  -71
  *
  * Reference:
  *
  * FreeBSD: /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,
	-10, -35, -12, -13, -14, -15, -16, -17, -18, -19,
	-20, -21, -22, -23, -24, -25, -26, -27, -28, -29,
	-30, -31, -32, -33, -34, -11,-115,-114, -88, -89,
	-90, -91, -92, -93, -94, -95, -96, -97, -98, -99,
	-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,-125, -84, -95, -16, -74,
	-72, -67,  -71
};

------------------------------------------------------------------------
                                                 From Beijing, China




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?courier.44DB35C2.00008645>