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

RE: [Xen-devel] errno i xs_wire.h


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Everhart, Craig" <Craig.Everhart@xxxxxxxxxx>
  • Date: Tue, 8 Nov 2005 16:59:15 -0500
  • Delivery-date: Tue, 08 Nov 2005 21:59:30 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcXkd8ElS9ILuFF3SzSVp/DJaI2f2QAN0EcA
  • Thread-topic: [Xen-devel] errno i xs_wire.h

Yes, trusting that different OS's will map errno names to the same
integers is asking for trouble.  Doing it right means translating
the values between domains.  Harry had it right with "local" and
"wire" error values, translating between them.

There's overlap in the mappings, particularly for some of the
smallest error values, but it's best not to be seduced by
the overlap into assuming it continues.

        Craig 

> -----Original Message-----
> From: Oleg Goldshmidt [mailto:pub@xxxxxxxxxxxxxx] 
> Sent: Tuesday, November 08, 2005 1:26 PM
> To: Mark Williamson
> Cc: xen-devel@xxxxxxxxxxxxxxxxxxx; Jacob Gorm Hansen
> Subject: Re: [Xen-devel] errno i xs_wire.h
> 
> Mark Williamson <mark.williamson@xxxxxxxxxxxx> writes:
> 
> > > playing with xenbus support in mini-os, I noticed that xs_wire.h 
> > > references errno constants such as EINVAL. Is the use of these 
> > > constants (which could be guest-OS specific)
> > 
> > Isn't the basic set of errno vals posix standardised?  So even if a 
> > guest OS doesn't deal in errnos itself, it can just import the BSD 
> > errno.h or similar...?
> 
> POSIX does not standardise errno *values*. It only specifies 
> a set of symbolic error names and their meanings, and says 
> that all the POSIX symbolic error names must have distinct values.
> 
> So if you need to share the values between entities that may 
> have different error name/value mappings (even if everybody is
> POSIX-compliant) you need a conversion protocol.
> 
> I suppose "man errno" will give you the set of POSIX error names.
> 
> --
> Oleg Goldshmidt | pub@xxxxxxxxxxxxxxxxxxxxx | 
> http://www.goldshmidt.org
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.