From: Ivana Hutarova Varekova Date: Wed, 30 Oct 2013 13:21:33 +0000 (+0100) Subject: cgroup_create_cgroup: write error on fail X-Git-Tag: v0.41~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c45064939193df4c043f77ecb95cdee6af23a69;p=thirdparty%2Flibcgroup.git cgroup_create_cgroup: write error on fail In the current version cgroup_create_cgroup returns warning if it fails and can't set some variable. Thus on default configuration there is no information about the problem. This situation happens if the cgconfigparser reads cgconfig.conf. The error message where is the problem is very useful in this case. The patch do the message visible in standard configuration. Signed-off-by: Ivana Hutarova Varekova Acked-by: Peter Schiffer --- diff --git a/src/api.c b/src/api.c index cd4e5b09..bfd0177b 100644 --- a/src/api.c +++ b/src/api.c @@ -1660,8 +1660,8 @@ int cgroup_create_cgroup(struct cgroup *cgroup, int ignore_ownership) * ignore it specifically if they wish. */ if (error) { - cgroup_warn("Warning: failed to set %s: %s (%d)\n", - path, cgroup_strerror(error), error); + cgroup_err("Error: failed to set %s: %s\n", + path, cgroup_strerror(error)); retval = ECGCANTSETVALUE; continue; }