core/cgroup: make unit_has_host_root_cgroup take const Unit*

This commit is contained in:
Mike Yuan 2024-06-15 13:15:08 +02:00
parent c97c79aded
commit 4442aef08e
No known key found for this signature in database
GPG key ID: 417471C0A40F58B3
2 changed files with 3 additions and 2 deletions

View file

@ -102,8 +102,9 @@ bool unit_has_startup_cgroup_constraints(Unit *u) {
c->startup_memory_low_set;
}
bool unit_has_host_root_cgroup(Unit *u) {
bool unit_has_host_root_cgroup(const Unit *u) {
assert(u);
assert(u->manager);
/* Returns whether this unit manages the root cgroup. This will return true if this unit is the root slice and
* the manager manages the root cgroup. */

View file

@ -503,7 +503,7 @@ int unit_reset_accounting(Unit *u);
})
bool manager_owns_host_root_cgroup(Manager *m);
bool unit_has_host_root_cgroup(Unit *u);
bool unit_has_host_root_cgroup(const Unit *u);
bool unit_has_startup_cgroup_constraints(Unit *u);