Please Update errno Mapping Table (BSD -> Linux)

Intron mag at intron.ac
Thu Aug 10 13:34:00 UTC 2006


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



More information about the freebsd-emulation mailing list