From: Christian Brauner Date: Mon, 10 Sep 2018 13:12:35 +0000 (+0200) Subject: cgroup: rename container specific cgroup functions X-Git-Tag: lxc-3.1.0~98^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8b181f5257f8216c1f66b366660030a210360c4;p=thirdparty%2Flxc.git cgroup: rename container specific cgroup functions Signed-off-by: Christian Brauner --- diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index bd72b38b2..a0d4cedb5 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -2591,8 +2591,8 @@ struct cgroup_ops *cgfsng_ops_init(struct lxc_conf *conf) cgfsng_ops->data_init = cgfsng_data_init; cgfsng_ops->destroy = cgfsng_destroy; - cgfsng_ops->create = cgfsng_create; - cgfsng_ops->enter = cgfsng_enter; + cgfsng_ops->payload_create = cgfsng_payload_create; + cgfsng_ops->payload_enter = cgfsng_payload_enter; cgfsng_ops->escape = cgfsng_escape; cgfsng_ops->num_hierarchies = cgfsng_num_hierarchies; cgfsng_ops->get_hierarchies = cgfsng_get_hierarchies; diff --git a/src/lxc/cgroups/cgroup.h b/src/lxc/cgroups/cgroup.h index 0c8b2ea88..351402127 100644 --- a/src/lxc/cgroups/cgroup.h +++ b/src/lxc/cgroups/cgroup.h @@ -124,8 +124,8 @@ struct cgroup_ops { bool (*data_init)(struct cgroup_ops *ops); void (*destroy)(struct cgroup_ops *ops, struct lxc_handler *handler); - bool (*create)(struct cgroup_ops *ops, struct lxc_handler *handler); - bool (*enter)(struct cgroup_ops *ops, pid_t pid); + bool (*payload_create)(struct cgroup_ops *ops, struct lxc_handler *handler); + bool (*payload_enter)(struct cgroup_ops *ops, pid_t pid); const char *(*get_cgroup)(struct cgroup_ops *ops, const char *controller); bool (*escape)(const struct cgroup_ops *ops, struct lxc_conf *conf); int (*num_hierarchies)(struct cgroup_ops *ops); diff --git a/src/lxc/criu.c b/src/lxc/criu.c index db9101b0f..ffcb1bb0f 100644 --- a/src/lxc/criu.c +++ b/src/lxc/criu.c @@ -972,7 +972,7 @@ static void do_restore(struct lxc_container *c, int status_pipe, struct migrate_ goto out_fini_handler; handler->cgroup_ops = cgroup_ops; - if (!cgroup_ops->create(cgroup_ops, handler)) { + if (!cgroup_ops->payload_create(cgroup_ops, handler)) { ERROR("failed creating groups"); goto out_fini_handler; } diff --git a/src/lxc/start.c b/src/lxc/start.c index 6d289dadd..02310635c 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1678,7 +1678,7 @@ static int lxc_spawn(struct lxc_handler *handler) } } - if (!cgroup_ops->create(cgroup_ops, handler)) { + if (!cgroup_ops->payload_create(cgroup_ops, handler)) { ERROR("Failed creating cgroups"); goto out_delete_net; } @@ -1772,7 +1772,7 @@ static int lxc_spawn(struct lxc_handler *handler) goto out_delete_net; } - if (!cgroup_ops->enter(cgroup_ops, handler->pid)) + if (!cgroup_ops->payload_enter(cgroup_ops, handler->pid)) goto out_delete_net; if (!cgroup_ops->chown(cgroup_ops, handler->conf))