aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linuxkpi/common
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2016-05-13 09:21:22 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2016-05-13 09:21:22 +0000
commit04a471587e52bf1fcf30ec907ed1261d2e4581e1 (patch)
tree409144c24f739b1b0769c616f863d430e9169d2b /sys/compat/linuxkpi/common
parent5f05199c1971b917f29bb0b8141367346fc3d1c2 (diff)
downloadsrc-04a471587e52bf1fcf30ec907ed1261d2e4581e1.tar.gz
src-04a471587e52bf1fcf30ec907ed1261d2e4581e1.zip
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
Notes
Notes: svn path=/head/; revision=299641
Diffstat (limited to 'sys/compat/linuxkpi/common')
-rw-r--r--sys/compat/linuxkpi/common/include/linux/errno.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/errno.h b/sys/compat/linuxkpi/common/include/linux/errno.h
index a043a3db6ec3..a972f4abec63 100644
--- a/sys/compat/linuxkpi/common/include/linux/errno.h
+++ b/sys/compat/linuxkpi/common/include/linux/errno.h
@@ -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_ */