summaryrefslogtreecommitdiffstats
path: root/src/core/unit.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-02-13 10:50:13 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-02-15 13:04:12 +0100
commitf2f725e5cc950e84ebfd09bd64bc01c0ebdb6734 (patch)
tree80ef98e352c8618a4f78668499701e86b8880e52 /src/core/unit.h
parentanalyze: fix typo in error message (diff)
downloadsystemd-f2f725e5cc950e84ebfd09bd64bc01c0ebdb6734.tar.xz
systemd-f2f725e5cc950e84ebfd09bd64bc01c0ebdb6734.zip
pid1: rename unit_check_gc to unit_may_gc
"check" is unclear: what is true, what is false? Let's rename to "can_gc" and revert the return value ("positive" values are easier to grok). v2: - rename from unit_can_gc to unit_may_gc
Diffstat (limited to 'src/core/unit.h')
-rw-r--r--src/core/unit.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/unit.h b/src/core/unit.h
index 3210583050..8e3d9bf323 100644
--- a/src/core/unit.h
+++ b/src/core/unit.h
@@ -490,10 +490,9 @@ struct UnitVTable {
/* Additionally to UnitActiveState determine whether unit is to be restarted. */
bool (*will_restart)(Unit *u);
- /* Return true when there is reason to keep this entry around
- * even nothing references it and it isn't active in any
- * way */
- bool (*check_gc)(Unit *u);
+ /* Return false when there is a reason to prevent this unit from being gc'ed
+ * even though nothing references it and it isn't active in any way. */
+ bool (*may_gc)(Unit *u);
/* When the unit is not running and no job for it queued we shall release its runtime resources */
void (*release_resources)(Unit *u);
@@ -623,7 +622,7 @@ int unit_add_exec_dependencies(Unit *u, ExecContext *c);
int unit_choose_id(Unit *u, const char *name);
int unit_set_description(Unit *u, const char *description);
-bool unit_check_gc(Unit *u);
+bool unit_may_gc(Unit *u);
void unit_add_to_load_queue(Unit *u);
void unit_add_to_dbus_queue(Unit *u);