[CRIU] [PATCHv3 3/3] libcriu: Add remote option for dump/restore

Radostin Stoyanov rstoyanov1 at gmail.com
Mon Feb 12 13:54:06 MSK 2018


Signed-off-by: Radostin Stoyanov <rstoyanov1 at gmail.com>
---
 lib/c/criu.c | 12 ++++++++++++
 lib/c/criu.h |  2 ++
 2 files changed, 14 insertions(+)

diff --git a/lib/c/criu.c b/lib/c/criu.c
index 08806c6e..b054eab7 100644
--- a/lib/c/criu.c
+++ b/lib/c/criu.c
@@ -299,6 +299,18 @@ int criu_add_unix_sk(unsigned int inode)
 	return criu_local_add_unix_sk(global_opts, inode);
 }
 
+void criu_local_set_remote(criu_opts *opts, bool remote)
+{
+	opts->rpc->has_remote = true;
+	opts->rpc->remote = remote;
+}
+
+void criu_set_remote(bool remote)
+{
+	criu_local_set_remote(global_opts, remote);
+}
+
+
 void criu_local_set_tcp_established(criu_opts *opts, bool tcp_established)
 {
 	opts->rpc->has_tcp_established	= true;
diff --git a/lib/c/criu.h b/lib/c/criu.h
index 5d0b5b6c..b6998e3b 100644
--- a/lib/c/criu.h
+++ b/lib/c/criu.h
@@ -95,6 +95,7 @@ void criu_set_ghost_limit(unsigned int limit);
 int criu_add_irmap_path(char *path);
 int criu_add_inherit_fd(int fd, char *key);
 int criu_add_external(char *key);
+void criu_set_remote(bool remote);
 
 /*
  * The criu_notify_arg_t na argument is an opaque
@@ -206,6 +207,7 @@ int criu_local_add_cg_props_file(criu_opts *opts, char *path);
 int criu_local_add_cg_dump_controller(criu_opts *opts, char *name);
 int criu_local_add_inherit_fd(criu_opts *opts, int fd, char *key);
 int criu_local_add_external(criu_opts *opts, char *key);
+void criu_local_set_remote(criu_opts *opts, bool remote);
 
 void criu_local_set_notify_cb(criu_opts *opts, int (*cb)(char *action, criu_notify_arg_t na));
 
-- 
2.14.3



More information about the CRIU mailing list