core/cgroup: make various functions static

Not used externally anymore with previous commits.
This commit is contained in:
Mike Yuan
2025-06-04 18:28:58 +02:00
parent 9fe837d529
commit ea763af4a9
2 changed files with 4 additions and 8 deletions

View File

@@ -1909,7 +1909,7 @@ void unit_invalidate_cgroup_members_masks(Unit *u) {
unit_invalidate_cgroup_members_masks(slice);
}
int unit_default_cgroup_path(const Unit *u, char **ret) {
static int unit_default_cgroup_path(const Unit *u, char **ret) {
_cleanup_free_ char *p = NULL;
int r;
@@ -1942,7 +1942,7 @@ int unit_default_cgroup_path(const Unit *u, char **ret) {
return 0;
}
int unit_set_cgroup_path(Unit *u, const char *path) {
static int unit_set_cgroup_path(Unit *u, const char *path) {
_cleanup_free_ char *p = NULL;
CGroupRuntime *crt;
int r;
@@ -1986,7 +1986,7 @@ int unit_get_cgroup_path_with_fallback(const Unit *u, char **ret) {
return strdup_to_full(ret, crt->cgroup_path); /* returns 1 -> cgroup_path is alive */
}
int unit_watch_cgroup(Unit *u) {
static int unit_watch_cgroup(Unit *u) {
_cleanup_free_ char *events = NULL;
int r;
@@ -2031,7 +2031,7 @@ int unit_watch_cgroup(Unit *u) {
return 0;
}
int unit_watch_cgroup_memory(Unit *u) {
static int unit_watch_cgroup_memory(Unit *u) {
_cleanup_free_ char *events = NULL;
int r;

View File

@@ -378,14 +378,10 @@ void unit_invalidate_cgroup_members_masks(Unit *u);
void unit_add_family_to_cgroup_realize_queue(Unit *u);
int unit_default_cgroup_path(const Unit *u, char **ret);
int unit_set_cgroup_path(Unit *u, const char *path);
int unit_get_cgroup_path_with_fallback(const Unit *u, char **ret);
int unit_realize_cgroup(Unit *u);
void unit_prune_cgroup(Unit *u);
int unit_watch_cgroup(Unit *u);
int unit_watch_cgroup_memory(Unit *u);
void unit_add_to_cgroup_realize_queue(Unit *u);
int unit_cgroup_is_empty(Unit *u);