lkml.org 
[lkml]   [2007]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: errno codes intertwined
On Fri, Aug 24, 2007 at 06:24:48PM +0200, Jan Engelhardt wrote:
...
> If a file does not have the requested attribute, the syscall will
> produce ENODATA. On x86_64, that is mapped to the value 61. Back on the
> sparc side, 61 is mapped to ECONNREFUSED, and that gives odd errors
> when ls tries to query xattrs:

I'd think that passing the raw error code is a bad idea, and that you
probably want to have your own set of codes that you use in the trasport and
map value to/from the host's errno values.

> the values are exactly swapped (mips is another oddball not portrayed
> here). Since these header files propagate into /usr/include, this
> affects userspace programs too.

Yep, and it kind of sucks.

> So I'm just asking: can I rely on the same errno across Linuxes?

I wouldn't - Linux on different different architectures seems to have
different errno codes.

> And should the errno values be fixed up?

It would break userspace :-/

Josef 'Jeff' Sipek.

--
*NOTE: This message is ROT-13 encrypted twice for extra protection*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-08-24 19:03    [W:0.071 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site