Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Mar 2018 14:51:47 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r331057 - head/sys/compat/linux
Message-ID:  <201803161451.w2GEpl3T053141@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803161451.w2GEpl3T053141>