Commit 88329c69 by Michel Normand Committed by Daniel Lezcano

stop config reading if cgroup setting failed

in today's code lxc-start to not stop if setup_cgroup is detecting an error Signed-off-by: 's avatarMichel Normand <michel_mno@laposte.net> Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent 1846e71a
......@@ -457,6 +457,7 @@ static int setup_cgroup(const char *name, struct lxc_list *cgroups)
{
struct lxc_list *iterator;
struct lxc_cgroup *cg;
int ret = -1;
if (lxc_list_empty(cgroups))
return 0;
......@@ -466,14 +467,15 @@ static int setup_cgroup(const char *name, struct lxc_list *cgroups)
cg = iterator->elem;
if (lxc_cgroup_set(name, cg->subsystem, cg->value))
break;
goto out;
DEBUG("cgroup '%s' set to '%s'", cg->subsystem, cg->value);
}
ret = 0;
INFO("cgroup has been setup");
return 0;
out:
return ret;
}
static void parse_mntopt(char *opt, unsigned long *flags, char **data)
......
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