Lines Matching refs:cgroup_path
60 static int __enable_controllers(const char *cgroup_path, const char *controllers) in __enable_controllers() argument
71 cgroup_path); in __enable_controllers()
92 snprintf(path, sizeof(path), "%s/cgroup.subtree_control", cgroup_path); in __enable_controllers()
123 char cgroup_path[PATH_MAX + 1]; in enable_controllers() local
125 format_cgroup_path(cgroup_path, relative_path); in enable_controllers()
126 return __enable_controllers(cgroup_path, controllers); in enable_controllers()
129 static int __write_cgroup_file(const char *cgroup_path, const char *file, in __write_cgroup_file() argument
135 snprintf(file_path, sizeof(file_path), "%s/%s", cgroup_path, file); in __write_cgroup_file()
164 char cgroup_path[PATH_MAX - 24]; in write_cgroup_file() local
166 format_cgroup_path(cgroup_path, relative_path); in write_cgroup_file()
167 return __write_cgroup_file(cgroup_path, file, buf); in write_cgroup_file()
185 char cgroup_path[PATH_MAX - 24]; in write_cgroup_file_parent() local
187 format_parent_cgroup_path(cgroup_path, relative_path); in write_cgroup_file_parent()
188 return __write_cgroup_file(cgroup_path, file, buf); in write_cgroup_file_parent()
251 static int join_cgroup_from_top(const char *cgroup_path) in join_cgroup_from_top() argument
258 "%s/cgroup.procs", cgroup_path); in join_cgroup_from_top()
288 char cgroup_path[PATH_MAX + 1]; in join_cgroup() local
290 format_cgroup_path(cgroup_path, relative_path); in join_cgroup()
291 return join_cgroup_from_top(cgroup_path); in join_cgroup()
316 char cgroup_path[PATH_MAX + 1]; in join_parent_cgroup() local
318 format_parent_cgroup_path(cgroup_path, relative_path); in join_parent_cgroup()
319 return join_cgroup_from_top(cgroup_path); in join_parent_cgroup()
336 char cgroup_path[PATH_MAX + 1]; in set_cgroup_xattr() local
338 format_cgroup_path(cgroup_path, relative_path); in set_cgroup_xattr()
339 return setxattr(cgroup_path, name, value, strlen(value) + 1, 0); in set_cgroup_xattr()
408 char cgroup_path[PATH_MAX + 1]; in remove_cgroup() local
410 format_cgroup_path(cgroup_path, relative_path); in remove_cgroup()
411 if (rmdir(cgroup_path)) in remove_cgroup()
412 log_err("rmdiring cgroup %s .. %s", relative_path, cgroup_path); in remove_cgroup()
427 char cgroup_path[PATH_MAX + 1]; in create_and_get_cgroup() local
430 format_cgroup_path(cgroup_path, relative_path); in create_and_get_cgroup()
431 if (mkdir(cgroup_path, 0777) && errno != EEXIST) { in create_and_get_cgroup()
432 log_err("mkdiring cgroup %s .. %s", relative_path, cgroup_path); in create_and_get_cgroup()
436 fd = open(cgroup_path, O_RDONLY); in create_and_get_cgroup()