[CRIU] [PATCH 1/2] cgroup: rename controller_entry to cg_member_entry

Tycho Andersen tycho.andersen at canonical.com
Thu Jul 3 06:03:48 PDT 2014


---
 cgroup.c              | 12 ++++++------
 protobuf/cgroup.proto |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/cgroup.c b/cgroup.c
index 9bf9e45..1fe5e6d 100644
--- a/cgroup.c
+++ b/cgroup.c
@@ -159,7 +159,7 @@ static int dump_sets(CgroupEntry *cg)
 	int s, c;
 	void *m;
 	CgSetEntry *se;
-	ControllerEntry *ce;
+	CgMemberEntry *ce;
 
 	pr_info("Dumping %d sets\n", n_sets - 1);
 
@@ -195,16 +195,16 @@ static int dump_sets(CgroupEntry *cg)
 		se->id = set->id;
 
 		se->n_ctls = set->n_ctls;
-		m = xmalloc(se->n_ctls * (sizeof(ControllerEntry *) + sizeof(ControllerEntry)));
+		m = xmalloc(se->n_ctls * (sizeof(CgMemberEntry *) + sizeof(CgMemberEntry)));
 		se->ctls = m;
-		ce = m + se->n_ctls * sizeof(ControllerEntry *);
+		ce = m + se->n_ctls * sizeof(CgMemberEntry *);
 		if (!m)
 			return -1;
 
 		c = 0;
 		list_for_each_entry(ctl, &set->ctls, l) {
 			pr_info("   `- Dumping %s of %s\n", ctl->name, ctl->path);
-			controller_entry__init(ce);
+			cg_member_entry__init(ce);
 			ce->name = ctl->name;
 			ce->path = ctl->path;
 			se->ctls[c++] = ce++;
@@ -256,7 +256,7 @@ static int move_in_cgroup(CgSetEntry *se)
 	for (i = 0; i < se->n_ctls; i++) {
 		char aux[1024];
 		int fd, err;
-		ControllerEntry *ce = se->ctls[i];
+		CgMemberEntry *ce = se->ctls[i];
 
 		if (strstartswith(ce->name, "name="))
 			sprintf(aux, "%s/%s/tasks", ce->name + 5, ce->path);
@@ -371,7 +371,7 @@ static int prepare_cgroup_sfd(CgSetEntry *root_set)
 	}
 
 	for (i = 0; i < root_set->n_ctls; i++) {
-		ControllerEntry *ce = root_set->ctls[i];
+		CgMemberEntry *ce = root_set->ctls[i];
 		char *opt = ce->name;
 
 		if (strstartswith(ce->name, "name=")) {
diff --git a/protobuf/cgroup.proto b/protobuf/cgroup.proto
index a497c70..139a3ad 100644
--- a/protobuf/cgroup.proto
+++ b/protobuf/cgroup.proto
@@ -1,11 +1,11 @@
-message controller_entry {
+message cg_member_entry {
 	required string name	= 1;
 	required string path	= 2;
 }
 
 message cg_set_entry {
 	required uint32			id	= 1;
-	repeated controller_entry	ctls	= 2;
+	repeated cg_member_entry	ctls	= 2;
 }
 
 message cgroup_entry {
-- 
1.9.1



More information about the CRIU mailing list