svn commit: r299641 - head/sys/compat/linuxkpi/common/include/linux

Hans Petter Selasky hselasky at FreeBSD.org
Fri May 13 09:21:24 UTC 2016


Author: hselasky
Date: Fri May 13 09:21:22 2016
New Revision: 299641
URL: https://svnweb.freebsd.org/changeset/base/299641

Log:
  The Linux error defines should all be positive, else frequently used
  error code checks might fail. ERESTART is in the BSD world defined as
  -1. While at it add more Linux error codes.
  
  Obtained from:	kmacy @
  MFC after:	1 week
  Sponsored by:	Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/linux/errno.h

Modified: head/sys/compat/linuxkpi/common/include/linux/errno.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/errno.h	Fri May 13 09:18:46 2016	(r299640)
+++ head/sys/compat/linuxkpi/common/include/linux/errno.h	Fri May 13 09:21:22 2016	(r299641)
@@ -2,7 +2,7 @@
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
  * Copyright (c) 2010 Panasas, Inc.
- * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
+ * Copyright (c) 2013-2016 Mellanox Technologies, Ltd.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -38,8 +38,23 @@
 #define	ECOMM           ESTALE
 #define	ENODATA         ECONNREFUSED
 #define	ENOIOCTLCMD     ENOIOCTL
-#define	ERESTARTSYS     ERESTART
+/* Use same value as Linux, because BSD's ERESTART is negative */
+#define	ERESTARTSYS     512
 #define	ENOTSUPP        EOPNOTSUPP
 #define	ENONET          EHOSTDOWN
 
+#define	ERESTARTNOINTR	513
+#define	ERESTARTNOHAND	514
+#define	ERESTART_RESTARTBLOCK 516
+#define	EPROBE_DEFER	517
+#define	EOPENSTALE	518
+#define	EBADHANDLE	521
+#define	ENOTSYNC	522
+#define	EBADCOOKIE	523
+#define	ETOOSMALL	525
+#define	ESERVERFAULT	526
+#define	EBADTYPE	527
+#define	EJUKEBOX	528
+#define	EIOCBQUEUED	529
+
 #endif					/* _LINUX_ERRNO_H_ */


More information about the svn-src-head mailing list