Re: errno codes intertwined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux