From: "Jan Beulich" Subject: Re: [PATCH] tools/hvmloader: link errno.h from xen internal Date: Fri, 31 Oct 2014 09:15:33 +0000 Message-ID: <545361450200007800043DBC@mail.emea.novell.com> References: <1414721915-11186-1-git-send-email-tiejun.chen@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1414721915-11186-1-git-send-email-tiejun.chen@intel.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: Tiejun Chen Cc: Ian Campbell , Ian Jackson , xen-devel@lists.xen.org, wei.liu2@citrix.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org >>> On 31.10.14 at 03:18, wrote: (You omitted half of the tools maintainers; Cc-ing them now.) > We will use some error numbers in hvmloader so here just link > this head file from xen. This is not a proper reasoning for using the Xen internal header here. You should make clear that we want to act on specific hypercall error codes, and hence require the hypervisors view on the errno.h values rather than the build environment's (as was sufficient for the use in xenbus.c). > --- a/tools/firmware/hvmloader/Makefile > +++ b/tools/firmware/hvmloader/Makefile > @@ -84,9 +84,13 @@ ROMS += $(SEABIOS_ROM) > endif > > .PHONY: all > -all: subdirs-all > +all: subdirs-all .dir > $(MAKE) hvmloader > > +.dir: > + @rm -rf errno.h Why? > --- a/tools/firmware/hvmloader/util.h > +++ b/tools/firmware/hvmloader/util.h > @@ -6,6 +6,7 @@ > #include > #include > #include > +#include "errno.h" Does this allow xenbus.c to still build? I think this either should go into the .c file wanting to use the values (preferable - remember my earlier comment about introducing unnecessary dependencies?), or the respective #include in xenbus.c should be dropped. Jan