From 04a471587e52bf1fcf30ec907ed1261d2e4581e1 Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Fri, 13 May 2016 09:21:22 +0000 Subject: 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 --- sys/compat/linuxkpi/common/include/linux/errno.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'sys') 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_ */ -- cgit v1.2.3