From ea763af4a9d152db4079b56ee0fb6cc00340f0fc Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Wed, 4 Jun 2025 18:28:58 +0200 Subject: [PATCH] core/cgroup: make various functions static Not used externally anymore with previous commits. --- src/core/cgroup.c | 8 ++++---- src/core/cgroup.h | 4 ---- 2 files changed, 4 insertions(+), 8 deletions(-) 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); -- 2.47.3