errno i xs_wire.h
hi,
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) in the wire-protocol not problematic? Should xs_wire.h define its own set of constants to be used instead?
Jacob
Yes, I think it is problematic. In the xenidc code for the USB driver I have a platform independent error type and functions to convert between local and wire protocol error values.
Quoted 15 lines · Jacob Gorm Hansen
hi,
playing with xenbus support in mini-os, I noticed that
xs_wire.hreferences errno constants such as EINVAL. Is the use of these constants (which could be guest-OS specific) in the wire-protocol not problematic? Shouldxs_wire.hdefine its own set of constants to be used instead?Jacob
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 7 lines · Jacob Gorm Hansen
hi,
playing with xenbus support in mini-os, I noticed that
xs_wire.hreferences errno constants such as EINVAL. Is the use of these constants (which could be guest-OS specific) in the wire-protocol not problematic? Shouldxs_wire.hdefine its own set of constants to be used instead?
I believe that xsd_errors is a translation table between your EINVAL integer code and the string "EINVAL", for use on the wire. That means that the table is correct to use the integer code appropriate to your platform.
Ewan.
Quoted 3 lines
playing with xenbus support in mini-os, I noticed that
xs_wire.hreferences 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...?
Cheers,
Mark
Quoted 10 lines
in the wire-protocol not
problematic? Shouldxs_wire.hdefine its own set of constants to be used instead?Jacob
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
I was talking with Rusty about this and apparently posix doesn't actually standardise the numbers.
Quoted 27 lines · Mark Williamson
Quoted 3 lines
playing with xenbus support in mini-os, I noticed that
xs_wire.hreferences 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.hor similar...?Cheers,
MarkQuoted 10 lines
in the wire-protocol not
problematic? Shouldxs_wire.hdefine its own set of constants to be used instead?Jacob
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 7 lines · Mark Williamson
Quoted 3 lines
playing with xenbus support in mini-os, I noticed that
xs_wire.hreferences 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.hor 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.
Signature · 1 line
Oleg Goldshmidt | [email protected] | http://www.goldshmidt.org