mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-06 13:09:50 +00:00
Added 3 new errno values, requred by various standards: EOVERFLOW,
ECANCELED, EILSEQ. Fixed ibcs2 and especially linux EIDRM and ENOMSG errno mapping. Reviewed by: Dan Nelson <dnelson@emsphone.com>
This commit is contained in:
parent
b13ebaaa5c
commit
85f118c801
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=41796
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_sysvec.c,v 1.37 1998/10/16 03:55:00 peter Exp $
|
||||
* $Id: linux_sysvec.c,v 1.38 1998/11/15 15:33:51 bde Exp $
|
||||
*/
|
||||
|
||||
/* XXX we use functions that might not exist. */
|
||||
@ -70,7 +70,7 @@ static void linux_sendsig __P((sig_t catcher, int sig, int mask,
|
||||
/*
|
||||
* Linux syscalls return negative errno's, we do positive and map them
|
||||
*/
|
||||
static int bsd_to_linux_errno[ELAST] = {
|
||||
static int bsd_to_linux_errno[ELAST + 1] = {
|
||||
-0, -1, -2, -3, -4, -5, -6, -7, -8, -9,
|
||||
-10, -35, -12, -13, -14, -15, -16, -17, -18, -19,
|
||||
-20, -21, -22, -23, -24, -25, -26, -27, -28, -29,
|
||||
@ -79,7 +79,7 @@ static int bsd_to_linux_errno[ELAST] = {
|
||||
-100,-101,-102,-103,-104,-105,-106,-107,-108,-109,
|
||||
-110,-111, -40, -36,-112,-113, -39, -11, -87,-122,
|
||||
-116, -66, -6, -6, -6, -6, -6, -37, -38, -9,
|
||||
-6, -43, -42
|
||||
-6, -6, -43, -42, -75, -6, -84
|
||||
};
|
||||
|
||||
int bsd_to_linux_signal[NSIG] = {
|
||||
@ -395,7 +395,7 @@ struct sysentvec linux_sysvec = {
|
||||
0xff,
|
||||
NSIG,
|
||||
bsd_to_linux_signal,
|
||||
ELAST,
|
||||
ELAST + 1,
|
||||
bsd_to_linux_errno,
|
||||
translate_traps,
|
||||
linux_fixup,
|
||||
@ -413,7 +413,7 @@ struct sysentvec elf_linux_sysvec = {
|
||||
0xff,
|
||||
NSIG,
|
||||
bsd_to_linux_signal,
|
||||
ELAST,
|
||||
ELAST + 1,
|
||||
bsd_to_linux_errno,
|
||||
translate_traps,
|
||||
elf_linux_fixup,
|
||||
|
@ -29,9 +29,10 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/errno.h>
|
||||
#include <i386/ibcs2/ibcs2_errno.h>
|
||||
|
||||
int bsd_to_ibcs2_errno[] = {
|
||||
int bsd_to_ibcs2_errno[ELAST + 1] = {
|
||||
0, /* 0 */
|
||||
IBCS2_EPERM, /* 1 */
|
||||
IBCS2_ENOENT, /* 2 */
|
||||
@ -116,5 +117,8 @@ int bsd_to_ibcs2_errno[] = {
|
||||
0, /* 81 */
|
||||
IBCS2_EIDRM, /* 82 */
|
||||
IBCS2_ENOMSG, /* 83 */
|
||||
IBCS2_EOVERFLOW, /* 84 */
|
||||
0, /* 85 */
|
||||
IBCS2_EILSEQ, /* 86 */
|
||||
};
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: ibcs2_sysvec.c,v 1.10 1998/11/07 04:34:02 peter Exp $
|
||||
* $Id: ibcs2_sysvec.c,v 1.11 1998/11/15 15:33:51 bde Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -49,7 +49,7 @@ struct sysentvec ibcs2_svr3_sysvec = {
|
||||
0xFF,
|
||||
NSIG,
|
||||
bsd_to_ibcs2_sig,
|
||||
ELAST,
|
||||
ELAST + 1,
|
||||
bsd_to_ibcs2_errno,
|
||||
0, /* trap-to-signal translation function */
|
||||
0, /* fixup */
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_sysvec.c,v 1.37 1998/10/16 03:55:00 peter Exp $
|
||||
* $Id: linux_sysvec.c,v 1.38 1998/11/15 15:33:51 bde Exp $
|
||||
*/
|
||||
|
||||
/* XXX we use functions that might not exist. */
|
||||
@ -70,7 +70,7 @@ static void linux_sendsig __P((sig_t catcher, int sig, int mask,
|
||||
/*
|
||||
* Linux syscalls return negative errno's, we do positive and map them
|
||||
*/
|
||||
static int bsd_to_linux_errno[ELAST] = {
|
||||
static int bsd_to_linux_errno[ELAST + 1] = {
|
||||
-0, -1, -2, -3, -4, -5, -6, -7, -8, -9,
|
||||
-10, -35, -12, -13, -14, -15, -16, -17, -18, -19,
|
||||
-20, -21, -22, -23, -24, -25, -26, -27, -28, -29,
|
||||
@ -79,7 +79,7 @@ static int bsd_to_linux_errno[ELAST] = {
|
||||
-100,-101,-102,-103,-104,-105,-106,-107,-108,-109,
|
||||
-110,-111, -40, -36,-112,-113, -39, -11, -87,-122,
|
||||
-116, -66, -6, -6, -6, -6, -6, -37, -38, -9,
|
||||
-6, -43, -42
|
||||
-6, -6, -43, -42, -75, -6, -84
|
||||
};
|
||||
|
||||
int bsd_to_linux_signal[NSIG] = {
|
||||
@ -395,7 +395,7 @@ struct sysentvec linux_sysvec = {
|
||||
0xff,
|
||||
NSIG,
|
||||
bsd_to_linux_signal,
|
||||
ELAST,
|
||||
ELAST + 1,
|
||||
bsd_to_linux_errno,
|
||||
translate_traps,
|
||||
linux_fixup,
|
||||
@ -413,7 +413,7 @@ struct sysentvec elf_linux_sysvec = {
|
||||
0xff,
|
||||
NSIG,
|
||||
bsd_to_linux_signal,
|
||||
ELAST,
|
||||
ELAST + 1,
|
||||
bsd_to_linux_errno,
|
||||
translate_traps,
|
||||
elf_linux_fixup,
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95
|
||||
* $Id: nfs_subs.c,v 1.67 1998/11/09 07:00:14 peter Exp $
|
||||
* $Id: nfs_subs.c,v 1.68 1998/12/07 21:58:44 archie Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -208,7 +208,8 @@ static u_char nfsrv_v2errmap[ELAST] = {
|
||||
NFSERR_NOTEMPTY, NFSERR_IO, NFSERR_IO, NFSERR_DQUOT, NFSERR_STALE,
|
||||
NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO,
|
||||
NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO,
|
||||
NFSERR_IO, NFSERR_IO, NFSERR_IO /* << Last is 83 */
|
||||
NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO,
|
||||
NFSERR_IO /* << Last is 86 */
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95
|
||||
* $Id: nfs_subs.c,v 1.67 1998/11/09 07:00:14 peter Exp $
|
||||
* $Id: nfs_subs.c,v 1.68 1998/12/07 21:58:44 archie Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -208,7 +208,8 @@ static u_char nfsrv_v2errmap[ELAST] = {
|
||||
NFSERR_NOTEMPTY, NFSERR_IO, NFSERR_IO, NFSERR_DQUOT, NFSERR_STALE,
|
||||
NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO,
|
||||
NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO,
|
||||
NFSERR_IO, NFSERR_IO, NFSERR_IO /* << Last is 83 */
|
||||
NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO,
|
||||
NFSERR_IO /* << Last is 86 */
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95
|
||||
* $Id: nfs_subs.c,v 1.67 1998/11/09 07:00:14 peter Exp $
|
||||
* $Id: nfs_subs.c,v 1.68 1998/12/07 21:58:44 archie Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -208,7 +208,8 @@ static u_char nfsrv_v2errmap[ELAST] = {
|
||||
NFSERR_NOTEMPTY, NFSERR_IO, NFSERR_IO, NFSERR_DQUOT, NFSERR_STALE,
|
||||
NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO,
|
||||
NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO,
|
||||
NFSERR_IO, NFSERR_IO, NFSERR_IO /* << Last is 83 */
|
||||
NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO,
|
||||
NFSERR_IO /* << Last is 86 */
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95
|
||||
* $Id: nfs_subs.c,v 1.67 1998/11/09 07:00:14 peter Exp $
|
||||
* $Id: nfs_subs.c,v 1.68 1998/12/07 21:58:44 archie Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -208,7 +208,8 @@ static u_char nfsrv_v2errmap[ELAST] = {
|
||||
NFSERR_NOTEMPTY, NFSERR_IO, NFSERR_IO, NFSERR_DQUOT, NFSERR_STALE,
|
||||
NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO,
|
||||
NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO,
|
||||
NFSERR_IO, NFSERR_IO, NFSERR_IO /* << Last is 83 */
|
||||
NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO,
|
||||
NFSERR_IO /* << Last is 86 */
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)errno.h 8.5 (Berkeley) 1/21/94
|
||||
* $Id: errno.h,v 1.9 1998/04/13 17:45:00 sos Exp $
|
||||
* $Id: errno.h,v 1.10 1998/04/30 09:38:03 jb Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_ERRNO_H_
|
||||
@ -161,9 +161,12 @@ __END_DECLS
|
||||
#define EFTYPE 79 /* Inappropriate file type or format */
|
||||
#define EAUTH 80 /* Authentication error */
|
||||
#define ENEEDAUTH 81 /* Need authenticator */
|
||||
#define EIDRM 82 /* Identifier removed */
|
||||
#define ENOMSG 83 /* No message of desired type */
|
||||
#define ELAST 83 /* Must be equal largest errno */
|
||||
#define EIDRM 82 /* Identifier removed */
|
||||
#define ENOMSG 83 /* No message of desired type */
|
||||
#define EOVERFLOW 84 /* Value to large to be stored in data type */
|
||||
#define ECANCELED 85 /* Operation canceled */
|
||||
#define EILSEQ 86 /* Illegal byte sequence */
|
||||
#define ELAST 86 /* Must be equal largest errno */
|
||||
|
||||
#endif /* _POSIX_SOURCE */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user