svn commit: r331057 - head/sys/compat/linux

Ed Maste emaste at FreeBSD.org
Fri Mar 16 14:51:48 UTC 2018


Author: emaste
Date: Fri Mar 16 14:51:47 2018
New Revision: 331057
URL: https://svnweb.freebsd.org/changeset/base/331057

Log:
  linux_errno.c: add newer errno values
  
  Also introduce a static assert to ensure the list is kept up to date.
  
  Sponsored by:	Turing Robotic Industries Inc.

Modified:
  head/sys/compat/linux/linux_errno.c

Modified: head/sys/compat/linux/linux_errno.c
==============================================================================
--- head/sys/compat/linux/linux_errno.c	Fri Mar 16 14:46:38 2018	(r331056)
+++ head/sys/compat/linux/linux_errno.c	Fri Mar 16 14:51:47 2018	(r331057)
@@ -28,14 +28,15 @@
  * $FreeBSD$
  */
 
+#include <sys/cdefs.h>
 #include <sys/errno.h>
 
 /*
  * Linux syscalls return negative errno's, we do positive and map them
  * Reference:
  *   FreeBSD: src/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
+ *   Linux:   include/uapi/asm-generic/errno-base.h
+ *            include/uapi/asm-generic/errno.h
  */
 const int bsd_to_linux_errno_generic[ELAST + 1] = {
 	-0,
@@ -140,4 +141,11 @@ const int bsd_to_linux_errno_generic[ELAST + 1] = {
 	-72,
 	-67,
 	-71,
+	-1,	/* ENOTCAPABLE -> EPERM */
+	-1,	/* ECAPMODE -> EPERM */
+	-131,	/* ENOTRECOVERABLE */
+	-130,	/* EOWNERDEAD */
 };
+
+_Static_assert(ELAST == 96,
+    "missing errno entries in bsd_to_linux_errno_generic");


More information about the svn-src-all mailing list