[PATCH] ia64/s390/s390x/sh: use common errnoent.h

Denys Vlasenko dvlasenk at redhat.com
Fri Feb 20 15:40:37 UTC 2009


On Fri, 2009-02-13 at 17:29 -0500, Mike Frysinger wrote:
> If we review arch/*/include/asm/errno.h in the kernel, we see that the
> ia64/s390/s390x/sh ports all use the common Linux errno values.  So stop
> duplicating the header in the strace arch dirs and let it use the common
> errnoent.h header.

Verifying...

These files in linux-2.6.28.6/arch:

arm/include/asm/errno.h
avr32/include/asm/errno.h
blackfin/include/asm/errno.h
cris/include/asm/errno.h
h8300/include/asm/errno.h
ia64/include/asm/errno.h
s390/include/asm/errno.h
sh/include/asm/errno.h
x86/include/asm/errno.h

just #include asm-generic/errno.h and do nothing else.

powerpc/include/asm/errno.h does the same, and then
makes one correction:

#undef  EDEADLOCK
#define EDEADLOCK       58      /* File locking deadlock error */
#define _LAST_ERRNO     516

In strace tree:

arm - ok, has no errnoent.h
avr32 - unsupported arch?
blackfin - ok, has no errnoent.h
cris - unsupported arch?
h8300 - unsupported arch?

ia64:
# diff -u
errnoent.h ../errnoent.h                                               
--- errnoent.h  2000-02-03 23:01:30.000000000 +0100
+++ ../errnoent.h       2008-04-19 21:07:23.000000000 +0200
@@ -123,3 +123,409 @@
        "EDQUOT", /* 122 */
        "ENOMEDIUM", /* 123 */
        "EMEDIUMTYPE", /* 124 */
+       "ECANCELED", /* 125 */
+       "ENOKEY", /* 126 */
+       "EKEYEXPIRED", /* 127 */      
...
so indeed its errnoent.h has no unique info.

s390[x]: same picture as in ia64

sh:
-       "ERRNO_125", /* 125 */
-       "ERRNO_126", /* 126 */
-       "ERRNO_127", /* 127 */
-       "ERRNO_128", /* 128 */
-       "ERRNO_129", /* 129 */
-       "ERRNO_130", /* 130 */
-       "ERRNO_131", /* 131 */
+       "ECANCELED", /* 125 */
+       "ENOKEY", /* 126 */
+       "EKEYEXPIRED", /* 127 */
+       "EKEYREVOKED", /* 128 */
+       "EKEYREJECTED", /* 129 */
+       "EOWNERDEAD", /* 130 */
+       "ENOTRECOVERABLE", /* 131 */
thus it's ok

sh64 - ok, has no errnoent.h
x86 - ok, has no errnoent.h


Your patch removes

 linux/ia64/errnoent.h
 linux/s390/errnoent.h
 linux/s390x/errnoent.h
 linux/sh/errnoent.h

so it looks 100% correct.

I am applying the patch, and then will try to deal with powerpc
by adding single #if.

Thanks!
--
vda






More information about the Strace-devel mailing list