From: Roger Pau Monne <roger.pau@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: StefanoStabellini <sstabellini@kernel.org>,
Wei Liu <wei.liu2@citrix.com>,
George Dunlap <george.dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
Julien Grall <julien.grall@arm.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH for-4.7 1/4] xen: remove usage of ENODATA error code
Date: Fri, 29 Apr 2016 18:34:43 +0200 [thread overview]
Message-ID: <20160429163443.idlpkicienoptxod@mac> (raw)
In-Reply-To: <5723A5BD02000078000E754F@prv-mh.provo.novell.com>
On Fri, Apr 29, 2016 at 10:19:41AM -0600, Jan Beulich wrote:
> >>> On 29.04.16 at 17:06, <roger.pau@citrix.com> wrote:
> > On Fri, Apr 29, 2016 at 08:44:48AM -0600, Jan Beulich wrote:
> >> >>> On 29.04.16 at 16:21, <roger.pau@citrix.com> wrote:
> >> > According to the POSIX standard for error codes [0], ENODATA is both
> >> > obsolescent (so it may be removed in the future) and optional.
> >>
> >> It being optional still doesn't preclude us using it.
> >>
> >> > Replace it's
> >> > usage with ENOENT, which seems like the closest match. Both FreeBSD and
> >> > OpenBSD don't have this error code in the native errno.h headers.
> >>
> >> There's no rule saying that Xen's errno set must match any other OS'es.
> >> That's one of the reasons why we (finally) separated ours.
> >
> > I understand that, but doing this means that then on the toolstack side we
> > need to start doing ifdefery in order to match values that are not present
> > in the native OS. For example a check was added to libxl against
> > XENVER_build_id returning ENODATA, this means that then on libxl I would
> > have to add a:
> >
> > #ifdef __FreeBSD__
> > #define ENODATA ENOENT
> > #endif
>
> You ought to be using XEN_NODATA there anyway.
No, the privcmd driver is the one that performs the translation from Xen
error codes into the OS error code space, so the tools just see error codes
in the OS space. No tools at all use XEN_* error codes directly.
This is because privcmd does the translation, and because it would be
impossible to differentiate if the errno returned by the ioctl belongs to
Xen space or to the OS space.
Roger.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-04-29 16:34 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-29 14:21 [PATCH for-4.7 0/4] xsplice fixes Roger Pau Monne
2016-04-29 14:21 ` [PATCH for-4.7 1/4] xen: remove usage of ENODATA error code Roger Pau Monne
2016-04-29 14:44 ` Jan Beulich
2016-04-29 15:06 ` Roger Pau Monne
2016-04-29 16:19 ` Jan Beulich
2016-04-29 16:34 ` Roger Pau Monne [this message]
2016-04-29 16:42 ` Jan Beulich
2016-04-29 16:52 ` Roger Pau Monne
2016-05-02 6:22 ` Jan Beulich
2016-05-02 8:55 ` Roger Pau Monne
2016-05-02 9:06 ` Jan Beulich
2016-05-02 11:06 ` Roger Pau Monne
2016-04-29 14:21 ` [PATCH for-4.7 2/4] tools/xsplice: corrently use errno Roger Pau Monne
2016-04-29 14:57 ` Wei Liu
2016-04-29 15:07 ` Roger Pau Monne
2016-04-29 15:08 ` Wei Liu
2016-04-29 14:21 ` [PATCH for-4.7 3/4] tools/xsplice: fix mixing system errno values with Xen ones Roger Pau Monne
2016-04-29 15:02 ` Wei Liu
2016-04-29 15:11 ` Andrew Cooper
2016-04-29 15:28 ` Wei Liu
2016-04-29 15:12 ` Roger Pau Monne
2016-04-29 15:30 ` Wei Liu
2016-05-02 11:00 ` Wei Liu
2016-04-29 14:21 ` [PATCH for-4.7 4/4] xen/xsplice: remove OSABI check when loading a payload Roger Pau Monne
2016-04-29 14:48 ` Jan Beulich
2016-04-29 15:16 ` Roger Pau Monne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160429163443.idlpkicienoptxod@mac \
--to=roger.pau@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=julien.grall@arm.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).