[klibc] klibc: s390 errno...

Martin Schwidefsky schwidefsky at de.ibm.com
Tue May 2 06:35:30 PDT 2006


On Tue, 2006-05-02 at 13:11 +0200, Arnd Bergmann wrote:
> > > >>
> > > >>The former is clearly right and the latter is clearly wrong.  Should I change the s390x version to match s390?
> > > >Looks like the right thing to do. Even though -125 seems to be wrong since we
> > > >have already
> > > >#define ENOTRECOVERABLE 131     /* State not recoverable */
> > > >Testing against -4095 is probably better.
> > > 
> > > I like -4096 better; that way it's effectively an "error page" at the top of the unsigned space.
> > > 
> > >From glibc.. that's why I would use -4095 :)
> > 
> > I will send you a patch later.
> > 
> 
> include/linux/errno.h has:
> 
> /* Should never be seen by user programs */
> #define ERESTARTSYS	512
> #define ERESTARTNOINTR	513
> ...
> 
> From that, I would say it should check against -512, not -4096.

Userspace traditionally checks against -4095. -512 is a special number
<inside> the linux kernel. It is unlikely but that could change to
something different than -512. I vote to check against -4095.

-- 
blue skies,
  Martin.

Martin Schwidefsky
Linux for zSeries Development & Services
IBM Deutschland Entwicklung GmbH

"Reality continues to ruin my life." - Calvin.




More information about the klibc mailing list