]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/cgroup: make various functions static 37733/head
authorMike Yuan <me@yhndnzj.com>
Wed, 4 Jun 2025 16:28:58 +0000 (18:28 +0200)
committerMike Yuan <me@yhndnzj.com>
Wed, 4 Jun 2025 20:03:48 +0000 (22:03 +0200)
Not used externally anymore with previous commits.

src/core/cgroup.c
src/core/cgroup.h

index 5752f7f0155684160213e13f54e4883f3bc54b6e..9f9ee0c3acc1cf0b8cd9e8c4d9a7a2057ba2de50 100644 (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;
 
index 07bcbd340e9c69010ac950706eaa8641cf08bc7a..dc5aaee58034b490a0ace9dff79309ee882091e7 100644 (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);