summaryrefslogtreecommitdiff
path: root/src/core/unit.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-30 16:21:41 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-05-01 19:40:51 -0400
commit8a993b61d1cd46a9c48d36fb67818883d80d9bc2 (patch)
tree260bc01a843aab21fcbbddaff5bd18a15b4636af /src/core/unit.c
parentf4bf8d2f45b02c26234219d07bfd3a41290cc84e (diff)
Move no_alias information to shared/
This way it can be used in install.c in subsequent commit.
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index 4a129ffd5e..0313ee2ad3 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -202,7 +202,7 @@ int unit_add_name(Unit *u, const char *text) {
if (u->type != _UNIT_TYPE_INVALID && !u->instance != !i)
return -EINVAL;
- if (unit_vtable[t]->no_alias && !set_isempty(u->names))
+ if (!unit_type_may_alias(t) && !set_isempty(u->names))
return -EEXIST;
if (hashmap_size(u->manager->units) >= MANAGER_MAX_NAMES)
@@ -720,7 +720,7 @@ int unit_merge(Unit *u, Unit *other) {
if (!u->instance != !other->instance)
return -EINVAL;
- if (UNIT_VTABLE(u)->no_alias) /* Merging only applies to unit names that support aliases */
+ if (!unit_type_may_alias(u->type)) /* Merging only applies to unit names that support aliases */
return -EEXIST;
if (other->load_state != UNIT_STUB &&