From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Tiejun Chen <tiejun.chen@intel.com>,
stefano.stabellini@eu.citrix.com, wei.liu2@citrix.com
Cc: JBeulich@suse.com, xen-devel@lists.xen.org
Subject: Re: [PATCH] tools/hvmloader: link errno.h from xen internal
Date: Fri, 31 Oct 2014 10:04:07 +0000 [thread overview]
Message-ID: <54535E97.2000105@citrix.com> (raw)
In-Reply-To: <1414721915-11186-1-git-send-email-tiejun.chen@intel.com>
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 <tiejun.chen@intel.com>
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.
~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 <stddef.h>
> #include <xen/xen.h>
> #include <xen/hvm/hvm_info_table.h>
> +#include "errno.h"
>
> #define __STR(...) #__VA_ARGS__
> #define STR(...) __STR(__VA_ARGS__)
next prev parent reply other threads:[~2014-10-31 10:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-31 2:18 [PATCH] tools/hvmloader: link errno.h from xen internal Tiejun Chen
2014-10-31 9:15 ` Jan Beulich
2014-11-03 2:03 ` Chen, Tiejun
2014-11-03 8:50 ` Jan Beulich
2014-10-31 10:04 ` Andrew Cooper [this message]
2014-10-31 10:51 ` Jan Beulich
2014-10-31 10:54 ` Andrew Cooper
2014-10-31 10:59 ` Jan Beulich
2014-11-03 2:06 ` Chen, Tiejun
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=54535E97.2000105@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tiejun.chen@intel.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.