else
TRACE("Removed cgroup tree %d(%s)", h->dfd_base, path_prune);
- free_equal(h->container_limit_path, h->container_full_path);
+ free_equal(h->container_limit_path, h->path_con);
}
return 0;
if (payload) {
h->dfd_con = move_fd(fd_final);
- h->container_full_path = move_ptr(path);
+ h->path_con = move_ptr(path);
if (fd_limit < 0)
h->dfd_lim = h->dfd_con;
if (limit_path)
h->container_limit_path = move_ptr(limit_path);
else
- h->container_limit_path = h->container_full_path;
+ h->container_limit_path = h->path_con;
} else {
h->dfd_mon = move_fd(fd_final);
}
if (h->dfd_lim < 0)
prune = false;
- free_equal(h->container_full_path, h->container_limit_path);
+ free_equal(h->path_con, h->container_limit_path);
close_equal(h->dfd_con, h->dfd_lim);
} else {
/* Check whether we actually created the cgroup to prune. */
true))
continue;
- DEBUG("Failed to create cgroup \"%s\"", ops->hierarchies[i]->container_full_path ?: "(null)");
+ DEBUG("Failed to create cgroup \"%s\"", ops->hierarchies[i]->path_con ?: "(null)");
for (int j = 0; j <= i; j++)
cgroup_tree_prune_leaf(ops->hierarchies[j],
limit_cgroup, true);
ret = lxc_writeat(h->dfd_con, "cgroup.procs", pidstr, len);
if (ret != 0)
- return log_error_errno(false, errno, "Failed to enter cgroup \"%s\"", h->container_full_path);
+ return log_error_errno(false, errno, "Failed to enter cgroup \"%s\"", h->path_con);
- TRACE("Moved container into %s cgroup via %d", h->container_full_path, h->dfd_con);
+ TRACE("Moved container into %s cgroup via %d", h->path_con, h->dfd_con);
}
return true;
if (!h)
return ret_set_errno(-1, ENOENT);
- return lxc_write_openat(h->container_full_path, "freezer.state",
+ return lxc_write_openat(h->path_con, "freezer.state",
"FROZEN", STRLITERALLEN("FROZEN"));
}
if (!h)
return ret_set_errno(-1, ENOENT);
- if (!h->container_full_path)
+ if (!h->path_con)
return ret_set_errno(-1, EEXIST);
if (timeout != 0) {
__do_free char *events_file = NULL;
- events_file = must_make_path(h->container_full_path, "cgroup.events", NULL);
+ events_file = must_make_path(h->path_con, "cgroup.events", NULL);
fd = open(events_file, O_RDONLY | O_CLOEXEC);
if (fd < 0)
return log_error_errno(-1, errno, "Failed to open cgroup.events file");
return log_error_errno(-1, errno, "Failed to add cgroup.events fd handler to mainloop");
}
- ret = lxc_write_openat(h->container_full_path, "cgroup.freeze", state_string, 1);
+ ret = lxc_write_openat(h->path_con, "cgroup.freeze", state_string, 1);
if (ret < 0)
return log_error_errno(-1, errno, "Failed to open cgroup.freeze file");
if (!h)
return ret_set_errno(-1, ENOENT);
- return lxc_write_openat(h->container_full_path, "freezer.state",
+ return lxc_write_openat(h->path_con, "freezer.state",
"THAWED", STRLITERALLEN("THAWED"));
}
if (limiting)
path = h->container_limit_path;
else
- path = h->container_full_path;
+ path = h->path_con;
if (!path)
return NULL;
return log_error_errno(-ENOENT, ENOENT, "Failed to setup limits for the \"%s\" controller. The controller seems to be unused by \"cgfsng\" cgroup driver or not enabled on the cgroup hierarchy", controller);
if (is_cpuset) {
- int ret = lxc_write_openat(h->container_full_path, filename, value, strlen(value));
+ int ret = lxc_write_openat(h->path_con, filename, value, strlen(value));
if (ret)
return ret;
}
unified = ops->unified;
if (!unified || !unified->bpf_device_controller ||
- !unified->container_full_path ||
+ !unified->path_con ||
lxc_list_empty(&(conf->bpf_devices).device_item))
return true;