xref: /freebsd/sys/compat/linux/linux_errno.c (revision 7ec2f6bce5d28e6662c29e63f6ab6b7ef57d98b2)
1 /* $FreeBSD$ */
2 
3 #include <sys/cdefs.h>
4 __FBSDID("$FreeBSD$");
5 
6 #include <sys/param.h>
7 #include <sys/errno.h>
8 #include <sys/systm.h>
9 
10 #include <compat/linux/linux.h>
11 #include <compat/linux/linux_errno.inc>
12 
13 int
14 linux_to_bsd_errno(int error)
15 {
16 
17 	KASSERT(error >= 0 && error <= ELAST,
18 	    ("%s: bad error %d", __func__, error));
19 
20 	return (linux_errtbl[error]);
21 }
22