Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHui Kang <hkang.sunysb@gmail.com>2015-08-30 06:36:00 +0300
committerPavel Emelyanov <xemul@parallels.com>2015-09-02 15:40:59 +0300
commit19dbe25918d5e61f60de498d380e5c25123c9fa3 (patch)
tree90406ac68e47e3f5736ffcb6f1bbe0c45708a61c
parent911bb682835cde01efde41f102975afd8846bd28 (diff)
Skip root cgroup directories when restoring with manage-cgroup=full
Signed-off-by: Hui Kang <hkang.sunysb@gmail.com> Signed-off-by: Andrew Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
-rw-r--r--cgroup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cgroup.c b/cgroup.c
index a4e0146e7..82088aa1a 100644
--- a/cgroup.c
+++ b/cgroup.c
@@ -992,6 +992,9 @@ static int prepare_cgroup_dir_properties(char *path, int off, CgroupDirEntry **e
CgroupDirEntry *e = ents[i];
size_t off2 = off;
+ if (strcmp(e->dir_name, "") == 0 &&
+ goto skip; /* skip root cgroups */
+
off2 += sprintf(path + off, "/%s", e->dir_name);
if (e->n_properties > 0) {
for (j = 0; j < e->n_properties; ++j) {
@@ -1000,6 +1003,7 @@ static int prepare_cgroup_dir_properties(char *path, int off, CgroupDirEntry **e
}
}
+skip:
if (prepare_cgroup_dir_properties(path, off2, e->children, e->n_children) < 0)
return -1;
}