int ret;
bool has_cgns = false, retval = false, wants_force_mount = false;
+ if (!ops)
+ return ret_set_errno(false, ENOENT);
+
if (!ops->hierarchies)
return true;
+ if (!handler || !handler->conf)
+ return ret_set_errno(false, EINVAL);
+
if ((type & LXC_AUTO_CGROUP_MASK) == 0)
return true;
continue;
ret = mkdir(controllerpath, 0755);
- if (ret < 0) {
- SYSERROR("Error creating cgroup path: %s", controllerpath);
- goto on_error;
- }
+ if (ret < 0)
+ log_error_errno(goto on_error, errno,
+ "Error creating cgroup path: %s",
+ controllerpath);
if (has_cgns && wants_force_mount) {
/* If cgroup namespaces are supported but the container