[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070824170006.GA3543@filer.fsl.cs.sunysb.edu>
Date: Fri, 24 Aug 2007 13:00:06 -0400
From: Josef Sipek <jsipek@....cs.sunysb.edu>
To: Jan Engelhardt <jengelh@...putergmbh.de>
Cc: sparclinux@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
parisc-linux@...isc-linux.org
Subject: Re: 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists