summaryrefslogtreecommitdiffstats
path: root/src/core/unit.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-07-08 17:43:14 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-07-19 16:51:14 +0200
commit96cf3ec96651939e9a5d48547854cb64b166544c (patch)
tree2e2cd03a586e97745863d47758dfc46fa6fd9407 /src/core/unit.c
parentbasic/set: constify operations which don't modify Set (diff)
downloadsystemd-96cf3ec96651939e9a5d48547854cb64b166544c.tar.xz
systemd-96cf3ec96651939e9a5d48547854cb64b166544c.zip
pid1: get rid of unit_supported() helper
Another case where "open code" is easier to read than the helper.
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index 700f38a6cd..2cd58c4704 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -1791,7 +1791,7 @@ int unit_start(Unit *u) {
* condition checks, so that we rather return condition check errors (which are usually not
* considered a true failure) than "not supported" errors (which are considered a failure).
*/
- if (!unit_supported(u))
+ if (!unit_type_supported(u->type))
return -EOPNOTSUPP;
/* Let's make sure that the deps really are in order before we start this. Normally the job engine
@@ -1826,7 +1826,7 @@ bool unit_can_start(Unit *u) {
if (u->load_state != UNIT_LOADED)
return false;
- if (!unit_supported(u))
+ if (!unit_type_supported(u->type))
return false;
/* Scope units may be started only once */
@@ -1875,7 +1875,7 @@ int unit_stop(Unit *u) {
bool unit_can_stop(Unit *u) {
assert(u);
- if (!unit_supported(u))
+ if (!unit_type_supported(u->type))
return false;
if (u->perpetual)