tools/libxl: rename remus checkpoint callbacks
authorYang Hongyang <yanghy@cn.fujitsu.com>
Fri, 10 Jul 2015 06:12:10 +0000 (14:12 +0800)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 21 Jul 2015 13:08:53 +0000 (14:08 +0100)
There are 2 remus checkpoint callbacks(save/restore), currently, they
both called libxl__remus_domain_checkpoint_callback in different
files, so it is ok. But in the following patch, we will move all of the
remus callback code into a separate file, the name should be different.
So rename them to:
  libxl__remus_domain_{save/restore}_checkpoint_callback

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
tools/libxl/libxl_create.c
tools/libxl/libxl_dom.c

index 5b4d333d75ee3d5203f5e86a04a5bd4eac2ebc24..a32e3df8b0ebf0d38dceb88bf33f063425296d69 100644 (file)
@@ -677,7 +677,7 @@ static int store_libxl_entry(libxl__gc *gc, uint32_t domid,
 static void remus_checkpoint_stream_done(
     libxl__egc *egc, libxl__stream_read_state *srs, int rc);
 
-static void libxl__remus_domain_checkpoint_callback(void *data)
+static void libxl__remus_domain_restore_checkpoint_callback(void *data)
 {
     libxl__save_helper_state *shs = data;
     libxl__domain_create_state *dcs = shs->caller_state;
@@ -989,7 +989,7 @@ static void domcreate_bootloader_done(libxl__egc *egc,
     }
 
     /* Restore */
-    callbacks->checkpoint = libxl__remus_domain_checkpoint_callback;
+    callbacks->checkpoint = libxl__remus_domain_restore_checkpoint_callback;
 
     rc = libxl__build_pre(gc, domid, d_config, state);
     if (rc)
index 5db518c638829fbf704687053cdec9ae386be58b..36286412b99ad03da61eb03a5c2172770d2aaa94 100644 (file)
@@ -1586,7 +1586,7 @@ static void remus_next_checkpoint(libxl__egc *egc, libxl__ev_time *ev,
                                   const struct timeval *requested_abs,
                                   int rc);
 
-static void libxl__remus_domain_checkpoint_callback(void *data)
+static void libxl__remus_domain_save_checkpoint_callback(void *data)
 {
     libxl__save_helper_state *shs = data;
     libxl__domain_suspend_state *dss = shs->caller_state;
@@ -1752,7 +1752,7 @@ void libxl__domain_save(libxl__egc *egc, libxl__domain_suspend_state *dss)
     if (r_info != NULL) {
         callbacks->suspend = libxl__remus_domain_suspend_callback;
         callbacks->postcopy = libxl__remus_domain_resume_callback;
-        callbacks->checkpoint = libxl__remus_domain_checkpoint_callback;
+        callbacks->checkpoint = libxl__remus_domain_save_checkpoint_callback;
         dss->sws.checkpoint_callback = remus_checkpoint_stream_written;
     } else
         callbacks->suspend = libxl__domain_suspend_callback;