summaryrefslogtreecommitdiff
path: root/src/unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-10-08 03:09:25 +0200
committerLennart Poettering <lennart@poettering.net>2010-10-08 03:09:25 +0200
commitb9c0d4415b8cd6135321185b6febfdd1366a477c (patch)
treec322309e262ea7c49c0ebe06ad0a52d8268c2dad /src/unit.c
parentf34277d9117cd9d858f7332eef0023e05277ce74 (diff)
systemctl: fix 'systemctl enable getty@.service'
Diffstat (limited to 'src/unit.c')
-rw-r--r--src/unit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/unit.c b/src/unit.c
index d2652bafb2..d45fe91560 100644
--- a/src/unit.c
+++ b/src/unit.c
@@ -103,7 +103,7 @@ int unit_add_name(Unit *u, const char *text) {
if (!s)
return -ENOMEM;
- if (!unit_name_is_valid(s)) {
+ if (!unit_name_is_valid(s, false)) {
r = -EINVAL;
goto fail;
}
@@ -2222,14 +2222,14 @@ UnitType unit_name_to_type(const char *n) {
return _UNIT_TYPE_INVALID;
}
-bool unit_name_is_valid(const char *n) {
+bool unit_name_is_valid(const char *n, bool template_ok) {
UnitType t;
t = unit_name_to_type(n);
if (t < 0 || t >= _UNIT_TYPE_MAX)
return false;
- return unit_name_is_valid_no_type(n);
+ return unit_name_is_valid_no_type(n, template_ok);
}
static const char* const unit_load_state_table[_UNIT_LOAD_STATE_MAX] = {