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

[Xen-changelog] [xen-unstable] xc_save: Clean up (*suspend)() callback hook.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1220868783 -3600
# Node ID a7586ec158d091f4ffd22e967e0acda2959ddcc3
# Parent  b146f0cf3b8bcb5e2c5c8c0276c4829baf3e3192
xc_save: Clean up (*suspend)() callback hook.
Sigend-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/libxc/ia64/xc_ia64_linux_save.c |    6 +++---
 tools/libxc/xc_domain_save.c          |    6 +++---
 tools/libxc/xenguest.h                |    2 +-
 tools/xcutils/xc_save.c               |   20 ++++++++++----------
 4 files changed, 17 insertions(+), 17 deletions(-)

diff -r b146f0cf3b8b -r a7586ec158d0 tools/libxc/ia64/xc_ia64_linux_save.c
--- a/tools/libxc/ia64/xc_ia64_linux_save.c     Mon Sep 08 10:55:09 2008 +0100
+++ b/tools/libxc/ia64/xc_ia64_linux_save.c     Mon Sep 08 11:13:03 2008 +0100
@@ -53,12 +53,12 @@ static inline void set_bit(int nr, volat
 }
 
 static int
-suspend_and_state(int (*suspend)(int), int xc_handle, int io_fd,
+suspend_and_state(int (*suspend)(void), int xc_handle, int io_fd,
                   int dom, xc_dominfo_t *info)
 {
     int i = 0;
 
-    if (!(*suspend)(dom)) {
+    if (!(*suspend)()) {
         ERROR("Suspend request failed");
         return -1;
     }
@@ -406,7 +406,7 @@ out:
 
 int
 xc_domain_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters,
-               uint32_t max_factor, uint32_t flags, int (*suspend)(int),
+               uint32_t max_factor, uint32_t flags, int (*suspend)(void),
                int hvm, void *(*init_qemu_maps)(int, unsigned),
                void (*qemu_flip_buffer)(int, int))
 {
diff -r b146f0cf3b8b -r a7586ec158d0 tools/libxc/xc_domain_save.c
--- a/tools/libxc/xc_domain_save.c      Mon Sep 08 10:55:09 2008 +0100
+++ b/tools/libxc/xc_domain_save.c      Mon Sep 08 11:13:03 2008 +0100
@@ -338,12 +338,12 @@ static int analysis_phase(int xc_handle,
 }
 
 
-static int suspend_and_state(int (*suspend)(int), int xc_handle, int io_fd,
+static int suspend_and_state(int (*suspend)(void), int xc_handle, int io_fd,
                              int dom, xc_dominfo_t *info)
 {
     int i = 0;
 
-    if ( !(*suspend)(dom) )
+    if ( !(*suspend)() )
     {
         ERROR("Suspend request failed");
         return -1;
@@ -796,7 +796,7 @@ static xen_pfn_t *map_and_save_p2m_table
 
 
 int xc_domain_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters,
-                   uint32_t max_factor, uint32_t flags, int (*suspend)(int),
+                   uint32_t max_factor, uint32_t flags, int (*suspend)(void),
                    int hvm, void *(*init_qemu_maps)(int, unsigned), 
                    void (*qemu_flip_buffer)(int, int))
 {
diff -r b146f0cf3b8b -r a7586ec158d0 tools/libxc/xenguest.h
--- a/tools/libxc/xenguest.h    Mon Sep 08 10:55:09 2008 +0100
+++ b/tools/libxc/xenguest.h    Mon Sep 08 11:13:03 2008 +0100
@@ -25,7 +25,7 @@
  */
 int xc_domain_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters,
                    uint32_t max_factor, uint32_t flags /* XCFLAGS_xxx */,
-                   int (*suspend)(int domid), int hvm,
+                   int (*suspend)(void), int hvm,
                    void *(*init_qemu_maps)(int, unsigned),  /* HVM only */
                    void (*qemu_flip_buffer)(int, int));     /* HVM only */
 
diff -r b146f0cf3b8b -r a7586ec158d0 tools/xcutils/xc_save.c
--- a/tools/xcutils/xc_save.c   Mon Sep 08 10:55:09 2008 +0100
+++ b/tools/xcutils/xc_save.c   Mon Sep 08 11:13:03 2008 +0100
@@ -32,7 +32,7 @@ static struct suspendinfo {
  * Issue a suspend request through stdout, and receive the acknowledgement
  * from stdin.  This is handled by XendCheckpoint in the Python layer.
  */
-static int compat_suspend(int domid)
+static int compat_suspend(void)
 {
     char ans[30];
 
@@ -43,7 +43,7 @@ static int compat_suspend(int domid)
             !strncmp(ans, "done\n", 5));
 }
 
-static int suspend_evtchn_release(int xc, int domid)
+static int suspend_evtchn_release(void)
 {
     if (si.suspend_evtchn >= 0) {
        xc_evtchn_unbind(si.xce, si.suspend_evtchn);
@@ -107,7 +107,7 @@ static int suspend_evtchn_init(int xc, i
     return 0;
 
   cleanup:
-    suspend_evtchn_release(xc, domid);
+    suspend_evtchn_release();
 
     return -1;
 }
@@ -115,7 +115,7 @@ static int suspend_evtchn_init(int xc, i
 /**
  * Issue a suspend request to a dedicated event channel in the guest, and
  * receive the acknowledgement from the subscribe event channel. */
-static int evtchn_suspend(int domid)
+static int evtchn_suspend(void)
 {
     int rc;
 
@@ -144,12 +144,12 @@ static int evtchn_suspend(int domid)
     return 1;
 }
 
-static int suspend(int domid)
+static int suspend(void)
 {
     if (si.suspend_evtchn >= 0)
-       return evtchn_suspend(domid);
-
-    return compat_suspend(domid);
+       return evtchn_suspend();
+
+    return compat_suspend();
 }
 
 /* For HVM guests, there are two sources of dirty pages: the Xen shadow
@@ -214,7 +214,7 @@ static void qemu_flip_buffer(int domid, 
         goto read_again;
 }
 
-static void * init_qemu_maps(int domid, unsigned int bitmap_size)
+static void *init_qemu_maps(int domid, unsigned int bitmap_size)
 {
     key_t key;
     char key_ascii[17] = {0,};
@@ -304,7 +304,7 @@ main(int argc, char **argv)
                          &suspend, !!(flags & XCFLAGS_HVM),
                          &init_qemu_maps, &qemu_flip_buffer);
 
-    suspend_evtchn_release(xc_fd, domid);
+    suspend_evtchn_release();
 
     xc_interface_close(xc_fd);
 

_______________________________________________
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®.