Skip to content

Commit

Permalink
cgroups/cgroup: replace logging functions
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Dec 8, 2019
1 parent c00683a commit 56e9648
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/lxc/cgroups/cgroup.c
Expand Up @@ -24,19 +24,16 @@ struct cgroup_ops *cgroup_init(struct lxc_conf *conf)
{
struct cgroup_ops *cgroup_ops;

if (!conf) {
ERROR("No valid conf given");
return NULL;
}
if (!conf)
return log_error_errno(NULL, EINVAL, "No valid conf given");

cgroup_ops = cgfsng_ops_init(conf);
if (!cgroup_ops) {
ERROR("Failed to initialize cgroup driver");
return NULL;
}
if (!cgroup_ops)
return log_error_errno(NULL, errno, "Failed to initialize cgroup driver");

if (!cgroup_ops->data_init(cgroup_ops))
return NULL;
if (cgroup_ops->data_init(cgroup_ops))
return log_error_errno(NULL, errno,
"Failed to initialize cgroup data");

TRACE("Initialized cgroup driver %s", cgroup_ops->driver);

Expand Down

0 comments on commit 56e9648

Please sign in to comment.