summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2005-03-08 10:26:59 +0000
committerEgbert Eich <eich@suse.de>2005-03-08 10:26:59 +0000
commit522628f25b4a075c8daf547991ea5b80c5efe9c7 (patch)
tree6cfa3c00489e4e0e1a220aeee7db29ffa052f344
parentdb7c9d349b86216ed00888181c64ab707fbe18d4 (diff)
Adding more errnos to the libc wrapper (Bugzilla #2672).
-rw-r--r--hw/xfree86/os-support/shared/libc_wrapper.c82
-rw-r--r--hw/xfree86/os-support/xf86_libc.h16
2 files changed, 95 insertions, 3 deletions
diff --git a/hw/xfree86/os-support/shared/libc_wrapper.c b/hw/xfree86/os-support/shared/libc_wrapper.c
index 59c08d85a..d02292231 100644
--- a/hw/xfree86/os-support/shared/libc_wrapper.c
+++ b/hw/xfree86/os-support/shared/libc_wrapper.c
@@ -429,6 +429,7 @@ xf86open(const char *path, int flags, ...)
}
va_end(ap);
xf86errno = xf86GetErrno();
+
return fd;
}
@@ -917,9 +918,48 @@ xf86strerror(int n)
mapnum (ETXTBSY); /* not POSIX 1 */
#endif
mapnum (ENOTTY);
+#ifdef ENOSYS
+ mapnum (ENOSYS);
+#endif
mapnum (EBUSY);
mapnum (ENODEV);
mapnum (EIO);
+#ifdef ESRCH
+ mapnum (ESRCH);
+#endif
+#ifdef ENXIO
+ mapnum (ENXIO);
+#endif
+#ifdef E2BIG
+ mapnum (E2BIG);
+#endif
+#ifdef ENOEXEC
+ mapnum (ENOEXEC);
+#endif
+#ifdef ECHILD
+ mapnum (ECHILD);
+#endif
+#ifdef ENOTBLK
+ mapnum (ENOTBLK);
+#endif
+#ifdef EXDEV
+ mapnum (EXDEV);
+#endif
+#ifdef EFBIG
+ mapnum (EFBIG);
+#endif
+#ifdef ESPIPE
+ mapnum (ESPIPE);
+#endif
+#ifdef EMLINK
+ mapnum (EMLINK);
+#endif
+#ifdef EDOM
+ mapnum (EDOM);
+#endif
+#ifdef ERANGE
+ mapnum (ERANGE);
+#endif
default:
err = 999;
@@ -1865,11 +1905,49 @@ xf86GetErrno ()
mapnum (ETXTBSY); /* not POSIX 1 */
#endif
mapnum (ENOTTY);
+#ifdef ENOSYS
+ mapnum (ENOSYS);
+#endif
mapnum (EBUSY);
mapnum (ENODEV);
mapnum (EIO);
-
- default:
+#ifdef ESRCH
+ mapnum (ESRCH);
+#endif
+#ifdef ENXIO
+ mapnum (ENXIO);
+#endif
+#ifdef E2BIG
+ mapnum (E2BIG);
+#endif
+#ifdef ENOEXEC
+ mapnum (ENOEXEC);
+#endif
+#ifdef ECHILD
+ mapnum (ECHILD);
+#endif
+#ifdef ENOTBLK
+ mapnum (ENOTBLK);
+#endif
+#ifdef EXDEV
+ mapnum (EXDEV);
+#endif
+#ifdef EFBIG
+ mapnum (EFBIG);
+#endif
+#ifdef ESPIPE
+ mapnum (ESPIPE);
+#endif
+#ifdef EMLINK
+ mapnum (EMLINK);
+#endif
+#ifdef EDOM
+ mapnum (EDOM);
+#endif
+#ifdef ERANGE
+ mapnum (ERANGE);
+#endif
+ default:
return (xf86_UNKNOWN);
}
}
diff --git a/hw/xfree86/os-support/xf86_libc.h b/hw/xfree86/os-support/xf86_libc.h
index b56f86d2c..f4f9f94e0 100644
--- a/hw/xfree86/os-support/xf86_libc.h
+++ b/hw/xfree86/os-support/xf86_libc.h
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h,v 1.2 2004/04/23 19:54:07 eich Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h,v 1.3 2005/03/02 11:20:29 gisburn Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h,v 3.63 2003/12/08 21:46:55 alanh Exp $ */
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
@@ -186,6 +186,20 @@ typedef int xf86jmp_buf[1024];
#define xf86_ENODEV 1023
#define xf86_EIO 1024
+#define xf86_ESRCH 1025
+#define xf86_ENXIO 1026
+#define xf86_E2BIG 1027
+#define xf86_ENOEXEC 1028
+#define xf86_ECHILD 1029
+#define xf86_ENOTBLK 1030
+#define xf86_EXDEV 1031
+#define xf86_EFBIG 1032
+#define xf86_ESPIPE 1033
+#define xf86_EMLINK 1034
+#define xf86_EDOM 1035
+#define xf86_ERANGE 1036
+
+
/* sysv IPV */
/* xf86shmget() */
#define XF86IPC_CREAT 01000