From: "Jan Beulich" Subject: Re: [PATCH v2] make error codes a formal part of the ABI Date: Thu, 15 Jan 2015 16:49:06 +0000 Message-ID: <54B7FD92020000780005589D@mail.emea.novell.com> References: <54B7E9E102000078000557AD@mail.emea.novell.com> <54B7EA7E.20800@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YBnbZ-00056x-5a for xen-devel@lists.xenproject.org; Thu, 15 Jan 2015 16:49:09 +0000 In-Reply-To: <54B7EA7E.20800@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Keir Fraser , Stefano Stabellini , Ian Jackson , Tim Deegan , Ian Campbell , xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 15.01.15 at 17:27, wrote: > On 15/01/15 15:25, Jan Beulich wrote: >> Now that we have two cases where patches against hvmloader got >> submitted needing to include the hypervisor's errno.h (for the host's >> system header not necessarily reflecting the correct numbers), take >> this as a strong sign that we need to make the error return values part >> of the hypervisor ABI (which de-fact they've always been). >> >> Signed-off-by: Jan Beulich > > How do the non XEN_ prefixed E$FOO get generated with this? All > "#define XEN_ERRNO(...)" tokenise XEN_## onto the name. No: >> --- a/xen/include/xen/errno.h >> +++ b/xen/include/xen/errno.h >> [...] >> +#ifndef __ASSEMBLY__ >> >> -#define ENOMEDIUM 123 /* No medium found */ >> -#define EMEDIUMTYPE 124 /* Wrong medium type */ >> +#define XEN_ERRNO(name, value) name = XEN_##name, The XEN_## one is on the right side here ... >> +enum { >> +#include >> +}; >> >> -/* ` } */ >> +#else /* !__ASSEMBLY__ */ >> >> -#endif >> +#define XEN_ERRNO(name, value) .equ name, XEN_##name ... and here. Jan