public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 1/1] fix syscallN() macro errno value checking for i386
@ 2005-01-29  1:01 blaisorblade
  2005-01-30 17:00 ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: blaisorblade @ 2005-01-29  1:01 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, blaisorblade, dhowells


From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: David Howells <dhowells@redhat.com>

The errno values which are visible for userspace are actually in the range 
-1 - -129, not until -128 (): this value was added:

#define	EKEYREJECTED	129	/* Key was rejected by service */

And this would break ucLibc (for what I heard).

This is just a quick-fix, because putting a macro inside errno.h instead of
having it copied in two places would be probably nicer.

However, I've heard by D. Howells it wasn't accepted, so this is the solution for now.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---

 linux-2.6.11-paolo/include/asm-i386/unistd.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -puN include/asm-i386/unistd.h~fix-syscall-macro include/asm-i386/unistd.h
--- linux-2.6.11/include/asm-i386/unistd.h~fix-syscall-macro	2005-01-29 00:42:48.000000000 +0100
+++ linux-2.6.11-paolo/include/asm-i386/unistd.h	2005-01-29 00:44:51.000000000 +0100
@@ -298,12 +298,12 @@
 #define NR_syscalls 289
 
 /*
- * user-visible error numbers are in the range -1 - -128: see
- * <asm-i386/errno.h>
+ * user-visible error numbers are in the range -1 - -129: see
+ * <asm-i386/errno.h> (currently it includes <asm-generic/errno.h>)
  */
 #define __syscall_return(type, res) \
 do { \
-	if ((unsigned long)(res) >= (unsigned long)(-(128 + 1))) { \
+	if ((unsigned long)(res) >= (unsigned long)(-(129 + 1))) { \
 		errno = -(res); \
 		res = -1; \
 	} \
_

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-03-08  3:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-29  1:01 [patch 1/1] fix syscallN() macro errno value checking for i386 blaisorblade
2005-01-30 17:00 ` Arnd Bergmann
2005-01-30 18:30   ` jerome lacoste
2005-02-04  0:36     ` H. Peter Anvin
2005-03-05 17:59     ` Blaisorblade

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox