[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110821135139.GB17323@router-fw-old.local.net-space.pl>
Date: Sun, 21 Aug 2011 15:51:39 +0200
From: Daniel Kiper <dkiper@...-space.pl>
To: konrad.wilk@...cle.com, ian.campbell@...rix.com, vgoyal@...hat.com,
horms@...ge.net.au, olaf@...fle.de, kexec@...ts.infradead.org,
xen-devel@...ts.xensource.com, linux-kernel@...r.kernel.org
Subject: [PATCH 1/4] xen: Take into account Xen control interface changes since Xen Ver. 4.1
xc_interface_open() receive three arguments instead of void and returns
pointer to xc_interface type instead of int since Xen Ver. 4.1. Take into
account that and allow kexec-tools compilation with all versions of Xen.
Signed-off-by: Daniel Kiper <dkiper@...-space.pl>
---
kexec/crashdump-xen.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/kexec/crashdump-xen.c b/kexec/crashdump-xen.c
index b347764..9dfabf8 100644
--- a/kexec/crashdump-xen.c
+++ b/kexec/crashdump-xen.c
@@ -126,19 +126,32 @@ unsigned long xen_architecture(struct crash_elf_info *elf_info)
{
unsigned long machine = elf_info->machine;
#ifdef HAVE_LIBXENCTRL
- int xc, rc;
+ int rc;
xen_capabilities_info_t capabilities;
+#ifdef XENCTRL_HAS_XC_INTERFACE
+ xc_interface *xc;
+#else
+ int xc;
+#endif
if (!xen_present())
goto out;
memset(capabilities, '0', XEN_CAPABILITIES_INFO_LEN);
+#ifdef XENCTRL_HAS_XC_INTERFACE
+ xc = xc_interface_open(NULL, NULL, 0);
+ if ( !xc ) {
+ fprintf(stderr, "failed to open xen control interface.\n");
+ goto out;
+ }
+#else
xc = xc_interface_open();
if ( xc == -1 ) {
fprintf(stderr, "failed to open xen control interface.\n");
goto out;
}
+#endif
rc = xc_version(xc, XENVER_capabilities, &capabilities[0]);
if ( rc == -1 ) {
--
1.5.6.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists