freebsd-dev/sys/compat/linux/linux_errno.c
Edward Tomasz Napierala 70890254b3 Get rid of sv_errtbl and SV_ABI_ERRNO().
Reviewed by:	kib
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D26388
2020-09-17 11:39:33 +00:00

22 lines
362 B
C

/* $FreeBSD$ */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/errno.h>
#include <sys/systm.h>
#include <compat/linux/linux.h>
#include <compat/linux/linux_errno.inc>
int
linux_to_bsd_errno(int error)
{
KASSERT(error >= 0 && error <= ELAST,
("%s: bad error %d", __func__, error));
return (linux_errtbl[error]);
}