From owner-svn-src-head@freebsd.org Fri May 13 09:21:24 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12C3CB39EBB; Fri, 13 May 2016 09:21:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4EE81387; Fri, 13 May 2016 09:21:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4D9LNEi081465; Fri, 13 May 2016 09:21:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4D9LNua081464; Fri, 13 May 2016 09:21:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201605130921.u4D9LNua081464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 13 May 2016 09:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299641 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2016 09:21:24 -0000 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_ */