diff options
author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2020-10-29 14:23:52 +0000 |
---|---|---|
committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2020-10-29 14:23:52 +0000 |
commit | 1a8577fa68d68b14f6ccddd43d01436eb323151b (patch) | |
tree | a4ab2b2bc5fd65937ad745cc22d4300619d845db /sys/compat/linux/linux_errno.c | |
parent | 80d8e42662d8f65d4a88a3043a61d19e1621ad91 (diff) |
Notes
Diffstat (limited to 'sys/compat/linux/linux_errno.c')
-rw-r--r-- | sys/compat/linux/linux_errno.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_errno.c b/sys/compat/linux/linux_errno.c index 30435dff4593..6302fd89d5d2 100644 --- a/sys/compat/linux/linux_errno.c +++ b/sys/compat/linux/linux_errno.c @@ -8,6 +8,7 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <compat/linux/linux.h> +#include <compat/linux/linux_errno.h> #include <compat/linux/linux_errno.inc> int @@ -19,3 +20,16 @@ bsd_to_linux_errno(int error) return (linux_errtbl[error]); } + +#ifdef INVARIANTS +void +linux_check_errtbl(void) +{ + int i; + + for (i = 1; i < sizeof(linux_errtbl); i++) { + KASSERT(linux_errtbl[i] != 0, + ("%s: linux_errtbl[%d] == 0", __func__, i)); + } +} +#endif |