From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chen, Tiejun" Subject: Re: [PATCH] tools/hvmloader: link errno.h from xen internal Date: Mon, 03 Nov 2014 10:06:47 +0800 Message-ID: <5456E337.7040704@intel.com> References: <1414721915-11186-1-git-send-email-tiejun.chen@intel.com> <54535E97.2000105@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <54535E97.2000105@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: Andrew Cooper , stefano.stabellini@eu.citrix.com, wei.liu2@citrix.com Cc: JBeulich@suse.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 2014/10/31 18:04, Andrew Cooper wrote: > On 31/10/14 02:18, Tiejun Chen wrote: >> We will use some error numbers in hvmloader so here just link >> this head file from xen. >> >> Signed-off-by: Tiejun Chen > > We already use stdint, stdarg, stdarg and error (in xenbus.c) from the > build environment. > > All of these are safe from an embedded point of view, which is > essentially what we are doing with hvmloader. > > I highly suggest we just go with the environments error.h and be done > with it. C99 is very nice to us in this way. Thanks for your comments. But looks we should follow-up Jan's further explanation. Thanks Tiejun > > ~Andrew > >> --- >> .gitignore | 1 + >> tools/firmware/hvmloader/Makefile | 8 ++++++-- >> tools/firmware/hvmloader/util.h | 1 + >> 3 files changed, 8 insertions(+), 2 deletions(-) >> >> diff --git a/.gitignore b/.gitignore >> index b24e905..52c3038 100644 >> --- a/.gitignore >> +++ b/.gitignore >> @@ -127,6 +127,7 @@ tools/firmware/hvmloader/acpi/ssdt_*.h >> tools/firmware/hvmloader/hvmloader >> tools/firmware/hvmloader/roms.h >> tools/firmware/hvmloader/roms.inc >> +tools/firmware/hvmloader/errno.h >> tools/firmware/rombios/BIOS-bochs-[^/]* >> tools/firmware/rombios/_rombios[^/]*_.c >> tools/firmware/rombios/rombios[^/]*.s >> diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile >> index 46a79c5..2e0f062 100644 >> --- 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 >> + ln -sf $(XEN_ROOT)/xen/include/xen/errno.h . >> + >> ovmf.o rombios.o seabios.o hvmloader.o: roms.inc >> smbios.o: CFLAGS += -D__SMBIOS_DATE__="\"$(shell date +%m/%d/%Y)\"" >> >> @@ -136,7 +140,7 @@ endif >> >> .PHONY: clean >> clean: subdirs-clean >> - rm -f roms.inc roms.inc.new acpi.h >> + rm -f roms.inc roms.inc.new acpi.h errno.h >> rm -f hvmloader hvmloader.tmp *.o $(DEPS) >> >> -include $(DEPS) >> diff --git a/tools/firmware/hvmloader/util.h b/tools/firmware/hvmloader/util.h >> index a70e4aa..1352025 100644 >> --- a/tools/firmware/hvmloader/util.h >> +++ b/tools/firmware/hvmloader/util.h >> @@ -6,6 +6,7 @@ >> #include >> #include >> #include >> +#include "errno.h" >> >> #define __STR(...) #__VA_ARGS__ >> #define STR(...) __STR(__VA_ARGS__) > > >