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

[Xen-changelog] [xen-unstable] [LIBXC] Fix non-x86 build.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxxx
# Date 1169393944 0
# Node ID c3e19108f3edab2632e8e782f1d8147f0b25ca3d
# Parent  7e28a8c150edae62aa1a7db4411eb6efbb96af7e
[LIBXC] Fix non-x86 build.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/libxc/xc_resume.c |   31 ++++++++++++++++++++++++-------
 1 files changed, 24 insertions(+), 7 deletions(-)

diff -r 7e28a8c150ed -r c3e19108f3ed tools/libxc/xc_resume.c
--- a/tools/libxc/xc_resume.c   Sat Jan 20 14:33:43 2007 +0000
+++ b/tools/libxc/xc_resume.c   Sun Jan 21 15:39:04 2007 +0000
@@ -1,4 +1,27 @@
 #include "xc_private.h"
+
+
+#if defined(__i386__) || defined(__x86_64__)
+static int modify_returncode(int xc_handle, uint32_t domid)
+{
+    vcpu_guest_context_t ctxt;
+    int rc;
+
+    if ( (rc = xc_vcpu_getcontext(xc_handle, domid, 0, &ctxt)) != 0 )
+        return rc;
+    ctxt.user_regs.eax = 1;
+    if ( (rc = xc_vcpu_setcontext(xc_handle, domid, 0, &ctxt)) != 0 )
+        return rc;
+
+    return 0;
+}
+#else
+static int modify_returncode(int xc_handle, uint32_t domid)
+{
+    return 0;
+}
+#endif
+
 
 /*
  * Resume execution of a domain after suspend shutdown.
@@ -13,7 +36,6 @@
  */
 int xc_domain_resume(int xc_handle, uint32_t domid)
 {
-    vcpu_guest_context_t ctxt;
     DECLARE_DOMCTL;
     int rc;
 
@@ -21,13 +43,8 @@ int xc_domain_resume(int xc_handle, uint
      * Set hypercall return code to indicate that suspend is cancelled
      * (rather than resuming in a new domain context).
      */
-#if defined(__i386__) || defined(__x86_64__)
-    if ( (rc = xc_vcpu_getcontext(xc_handle, domid, 0, &ctxt)) != 0 )
+    if ( (rc = modify_returncode(xc_handle, domid)) != 0 )
         return rc;
-    ctxt.user_regs.eax = 1;
-    if ( (rc = xc_vcpu_setcontext(xc_handle, domid, 0, &ctxt)) != 0 )
-        return rc;
-#endif
 
     domctl.cmd = XEN_DOMCTL_resumedomain;
     domctl.domain = domid;

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


 


Rackspace

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