cgroup-util: drop 'controller' argument from cg_path_open()
Nowadays it always takes SYSTEMD_CGROUP_CONTROLLER as controller. Let's drop it. No functional change, just refactoring.
This commit is contained in:
@@ -63,11 +63,11 @@ int cg_is_available(void) {
|
||||
return is_fs_type(&fs, CGROUP2_SUPER_MAGIC);
|
||||
}
|
||||
|
||||
int cg_path_open(const char *controller, const char *path) {
|
||||
int cg_path_open(const char *path) {
|
||||
_cleanup_free_ char *fs = NULL;
|
||||
int r;
|
||||
|
||||
r = cg_get_path(controller, path, /* suffix=*/ NULL, &fs);
|
||||
r = cg_get_path(SYSTEMD_CGROUP_CONTROLLER, path, /* suffix= */ NULL, &fs);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ typedef enum CGroupUnified {
|
||||
|
||||
int cg_is_available(void);
|
||||
|
||||
int cg_path_open(const char *controller, const char *path);
|
||||
int cg_path_open(const char *path);
|
||||
int cg_cgroupid_open(int cgroupfs_fd, uint64_t id);
|
||||
|
||||
int cg_path_from_cgroupid(int cgroupfs_fd, uint64_t id, char **ret);
|
||||
|
||||
Reference in New Issue
Block a user