[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/4] xen: Take into account Xen control interface changes since Xen Ver. 4.1



Dear Friends,
I am pursuing Ph.D. in virtualization,
I want to study detail architecture and implementation of Xen
As I wanted to start from scratch ,can you suggest some guidance or resource for it.
Thanking you
Rajendra Bele
Pune,India

On Sun, Aug 21, 2011 at 7:36 PM, Daniel Kiper <dkiper@xxxxxxxxxxxx> wrote:
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@xxxxxxxxxxxx>
---
Â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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.