From: Mike Yuan Date: Wed, 4 Jun 2025 16:28:58 +0000 (+0200) Subject: core/cgroup: make various functions static X-Git-Tag: v258-rc1~386^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F37733%2Fhead;p=thirdparty%2Fsystemd.git core/cgroup: make various functions static Not used externally anymore with previous commits. --- diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 5752f7f0155..9f9ee0c3acc 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -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; diff --git a/src/core/cgroup.h b/src/core/cgroup.h index 07bcbd340e9..dc5aaee5803 100644 --- a/src/core/cgroup.h +++ b/src/core/cgroup.h @@ -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);