cgroups/cgfsng: rework cgfsng_unfreeze()

parent 1d0ef851
...@@ -2176,18 +2176,19 @@ __cgfsng_ops static int cgfsng_unfreeze(struct cgroup_ops *ops, int timeout) ...@@ -2176,18 +2176,19 @@ __cgfsng_ops static int cgfsng_unfreeze(struct cgroup_ops *ops, int timeout)
} }
__cgfsng_ops static const char *cgfsng_get_cgroup(struct cgroup_ops *ops, __cgfsng_ops static const char *cgfsng_get_cgroup(struct cgroup_ops *ops,
const char *controller) const char *controller)
{ {
struct hierarchy *h; struct hierarchy *h;
h = get_hierarchy(ops, controller); h = get_hierarchy(ops, controller);
if (!h) { if (!h)
WARN("Failed to find hierarchy for controller \"%s\"", return log_warn_errno(NULL,
controller ? controller : "(null)"); ENOENT, "Failed to find hierarchy for controller \"%s\"",
return NULL; controller ? controller : "(null)");
}
return h->container_full_path ? h->container_full_path + strlen(h->mountpoint) : NULL; return h->container_full_path
? h->container_full_path + strlen(h->mountpoint)
: NULL;
} }
/* Given a cgroup path returned from lxc_cmd_get_cgroup_path, build a full path, /* Given a cgroup path returned from lxc_cmd_get_cgroup_path, build a full path,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment