rpc: Add missing RPC entry for --freeze-cgroup option

Submitted by Cyrill Gorcunov on June 9, 2016, 4:56 p.m.

Details

Message ID 1465491399-29127-1-git-send-email-gorcunov@virtuozzo.com
State Rejected
Series "rpc: Add missing RPC entry for --freeze-cgroup option"
Headers show

Commit Message

Cyrill Gorcunov June 9, 2016, 4:56 p.m.
Signed-off-by: Cyrill Gorcunov <gorcunov@virtuozzo.com>
---
 images/rpc.proto |  1 +
 lib/c/criu.c     | 11 +++++++++++
 lib/c/criu.h     |  2 ++
 3 files changed, 14 insertions(+)

Patch hide | download patch | download mbox

diff --git a/images/rpc.proto b/images/rpc.proto
index 9ece4da..ff8bbda 100644
--- a/images/rpc.proto
+++ b/images/rpc.proto
@@ -97,6 +97,7 @@  message criu_opts {
 	repeated string			external	= 37;
 	optional uint32			empty_ns	= 38;
 	repeated join_namespace		join_ns		= 39;
+	optional bool			freeze_cgroup	= 40;
 }
 
 message criu_dump_resp {
diff --git a/lib/c/criu.c b/lib/c/criu.c
index 52d1b61..d168d49 100644
--- a/lib/c/criu.c
+++ b/lib/c/criu.c
@@ -385,6 +385,17 @@  void criu_set_manage_cgroups_mode(enum criu_cg_mode mode)
 	criu_local_set_manage_cgroups_mode(global_opts, mode);
 }
 
+void criu_local_set_freeze_cgroup(criu_opts *opts, bool val)
+{
+	opts->rpc->has_freeze_cgroup = true;
+	opts->rpc->freeze_cgroup = val;
+}
+
+void criu_set_freeze_cgroup(bool val)
+{
+	criu_local_set_freeze_cgroup(global_opts, val);
+}
+
 void criu_local_set_auto_ext_mnt(criu_opts *opts, bool val)
 {
 	opts->rpc->has_auto_ext_mnt = true;
diff --git a/lib/c/criu.h b/lib/c/criu.h
index 0898be0..b05b11f 100644
--- a/lib/c/criu.h
+++ b/lib/c/criu.h
@@ -78,6 +78,7 @@  void criu_set_cpu_cap(unsigned int cap);
 void criu_set_root(char *root);
 void criu_set_manage_cgroups(bool manage);
 void criu_set_manage_cgroups_mode(enum criu_cg_mode mode);
+void criu_set_freeze_cgroup(bool freeze);
 void criu_set_auto_ext_mnt(bool val);
 void criu_set_ext_sharing(bool val);
 void criu_set_ext_masters(bool val);
@@ -180,6 +181,7 @@  void criu_local_set_cpu_cap(criu_opts *opts, unsigned int cap);
 void criu_local_set_root(criu_opts *opts, char *root);
 void criu_local_set_manage_cgroups(criu_opts *opts, bool manage);
 void criu_local_set_manage_cgroups_mode(criu_opts *opts, enum criu_cg_mode mode);
+void criu_local_set_freeze_cgroup(criu_opts *opts, bool val);
 void criu_local_set_auto_ext_mnt(criu_opts *opts, bool val);
 void criu_local_set_ext_sharing(criu_opts *opts, bool val);
 void criu_local_set_ext_masters(criu_opts *opts, bool val);

Comments

Kirill Gorkunov June 9, 2016, 5:31 p.m.
On Thu, Jun 09, 2016 at 07:56:39PM +0300, Cyrill Gorcunov wrote:
> Signed-off-by: Cyrill Gorcunov <gorcunov@virtuozzo.com>

It won't apply on criu-dev, I'll repare another patch for it.