]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
cgroup_create_cgroup: write error on fail
authorIvana Hutarova Varekova <varekova@redhat.com>
Wed, 30 Oct 2013 13:21:33 +0000 (14:21 +0100)
committerIvana Hutarova Varekova <varekova@redhat.com>
Wed, 30 Oct 2013 13:21:33 +0000 (14:21 +0100)
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 <varekova@redhat.com>
Acked-by: Peter Schiffer <pschiffe@redhat.com>
src/api.c

index cd4e5b096b41e4d905e0b7439b00426a896d283b..bfd0177b987c6fdc6aca42238eb1806e77367f63 100644 (file)
--- 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;
                        }