[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.6] hvmloader: use xen/errno.h rather than the host systems errno.h
commit 4edf3a38cef9edb65738c45147def502b24eab3a Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Mon Mar 7 17:46:03 2016 +0100 Commit: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> CommitDate: Wed May 29 12:08:32 2019 +0100 hvmloader: use xen/errno.h rather than the host systems errno.h hvmloader is unhosted, and shouldn't use the system errno.h. It already has to use Xen's errno.h for other hypercalls. The use of public/io/xs_wire.h requires the use of un-prefixed errno values. This fixes the build on stricter toolchains where requesting -fno-builtin does reduce the include path as much as it can. Reported-by: Doug Goldstein <cardoe@xxxxxxxxxx> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Doug Goldstein <cardoe@xxxxxxxxxx> Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> (cherry picked from commit 305e957ffee94fc06c4ba53ef5562f1b8c1c6b02) --- tools/firmware/hvmloader/util.h | 9 +++++++++ tools/firmware/hvmloader/vnuma.c | 3 +-- tools/firmware/hvmloader/xenbus.c | 1 - 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/firmware/hvmloader/util.h b/tools/firmware/hvmloader/util.h index 132d915d87..31268175d8 100644 --- a/tools/firmware/hvmloader/util.h +++ b/tools/firmware/hvmloader/util.h @@ -9,6 +9,15 @@ #include <xen/hvm/hvm_info_table.h> #include "e820.h" +/* Request un-prefixed values from errno.h. */ +#define XEN_ERRNO(name, value) name = value, +enum { +#include <xen/errno.h> +}; + +/* Cause xs_wire.h to give us xsd_errors[]. */ +#define EINVAL EINVAL + #define __STR(...) #__VA_ARGS__ #define STR(...) __STR(__VA_ARGS__) diff --git a/tools/firmware/hvmloader/vnuma.c b/tools/firmware/hvmloader/vnuma.c index 4121cc66a6..85c1a792c6 100644 --- a/tools/firmware/hvmloader/vnuma.c +++ b/tools/firmware/hvmloader/vnuma.c @@ -28,7 +28,6 @@ #include "util.h" #include "hypercall.h" #include "vnuma.h" -#include <xen/errno.h> unsigned int nr_vnodes, nr_vmemranges; unsigned int *vcpu_to_vnode, *vdistance; @@ -40,7 +39,7 @@ void init_vnuma_info(void) struct xen_vnuma_topology_info vnuma_topo = { .domid = DOMID_SELF }; rc = hypercall_memory_op(XENMEM_get_vnumainfo, &vnuma_topo); - if ( rc != -XEN_ENOBUFS ) + if ( rc != -ENOBUFS ) return; ASSERT(vnuma_topo.nr_vcpus == hvm_info->nr_vcpus); diff --git a/tools/firmware/hvmloader/xenbus.c b/tools/firmware/hvmloader/xenbus.c index d0ed993cca..448157dcb0 100644 --- a/tools/firmware/hvmloader/xenbus.c +++ b/tools/firmware/hvmloader/xenbus.c @@ -27,7 +27,6 @@ #include "util.h" #include "hypercall.h" -#include <errno.h> #include <xen/sched.h> #include <xen/event_channel.h> #include <xen/hvm/params.h> -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.6 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |