Lines Matching refs:path
32 #define format_cgroup_path(buf, path) \
34 CGROUP_WORK_DIR, path)
46 char path[PATH_MAX + 1];
52 snprintf(path, sizeof(path), "%s/cgroup.controllers", cgroup_path);
53 fd = open(path, O_RDONLY);
55 log_err("Opening cgroup.controllers: %s", path);
62 log_err("Reading cgroup.controllers: %s", path);
72 snprintf(path, sizeof(path), "%s/cgroup.subtree_control", cgroup_path);
73 cfd = open(path, O_RDWR);
75 log_err("Opening cgroup.subtree_control: %s", path);
81 log_err("Enabling controller %s: %s", c, path);
169 * @path: The cgroup path, relative to the workdir, to join
172 * work dir, and it joins it. For example, passing "/my-cgroup" as the path
178 int join_cgroup(const char *path)
182 format_cgroup_path(cgroup_path, path);
210 * @path: The cgroup path, relative to the workdir, to join
218 int create_and_get_cgroup(const char *path)
223 format_cgroup_path(cgroup_path, path);
225 log_err("mkdiring cgroup %s .. %s", path, cgroup_path);
239 * get_cgroup_id() - Get cgroup id for a particular cgroup path
240 * @path: The cgroup path, relative to the workdir, to join
246 unsigned long long get_cgroup_id(const char *path)
257 format_cgroup_path(cgroup_workdir, path);
294 int cgroup_setup_and_join(const char *path) {
302 cg_fd = create_and_get_cgroup(path);
309 if (join_cgroup(path)) {