From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] hvmloader: Use xen/errno.h rather than the host systems errno.h Date: Fri, 19 Feb 2016 11:09:02 +0000 Message-ID: <56C6F7CE.5040306@citrix.com> References: <1455833409-19139-1-git-send-email-andrew.cooper3@citrix.com> <20160219104036.GP3723@citrix.com> <56C6F375.4040001@citrix.com> <1455879628.6225.96.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1455879628.6225.96.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell , Wei Liu Cc: Doug Goldstein , Ian Jackson , Jan Beulich , Xen-devel List-Id: xen-devel@lists.xenproject.org On 19/02/16 11:00, Ian Campbell wrote: > On Fri, 2016-02-19 at 10:50 +0000, Andrew Cooper wrote: >> On 19/02/16 10:40, Wei Liu wrote: >>> On Thu, Feb 18, 2016 at 10:10:09PM +0000, Andrew Cooper wrote: >>>> Signed-off-by: Andrew Cooper >>>> --- >>>> CC: Jan Beulich >>>> CC: Ian Campbell >>>> CC: Ian Jackson >>>> CC: Wei Liu >>>> CC: Doug Goldstein >>>> --- >>>> tools/firmware/hvmloader/xenbus.c | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/tools/firmware/hvmloader/xenbus.c >>>> b/tools/firmware/hvmloader/xenbus.c >>>> index d0ed993..947d865 100644 >>>> --- a/tools/firmware/hvmloader/xenbus.c >>>> +++ b/tools/firmware/hvmloader/xenbus.c >>>> @@ -27,7 +27,7 @@ >>>> >>>> #include "util.h" >>>> #include "hypercall.h" >>>> -#include >>>> +#include >>> This doesn't seem to compile for me. Xen's error numbers live in a >>> different name space. >> It compiled fine for me. HVMLoader should use __XEN_TOOLS__. > It shouldn't and doesn't, see 3237645813d7 which stopped setting > __XEN_TOOLS__ globally for all of tools/* and consequently removed the > -U__XEN_TOOLS__ from hvmloader. > > In any case I don't think __XEN_TOOLS__ has any impact on xen/errno.h > (which is, perhaps confusingly, xen/include/public/errno.h and not > xen/include/xen/errno.h) > > For normal userspace uses of __XEN_TOOLS__ you wouldn't want unprefixed Xen > errno values added to your namespace anyway -- since you need to deal with > OS errno names/values. HVMloader is an unhosted 32bit environment, which is why it should not be using the hosts errno.h in the first place. ~Andrew