summaryrefslogtreecommitdiff
path: root/src/shared/install.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-26 15:30:22 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-26 15:49:54 -0500
commitf78e6385dc4cee0a1f399c4c89ebf823c108d447 (patch)
treee1baf230750ddd221b8bdd71ac4d62f5b3472968 /src/shared/install.c
parente3e0314b56012f7febc279d268f2cadc1fcc0f25 (diff)
Use enums to make it obvious what boolean params mean
Suggested-by: Russ Allbery <rra@debian.org>
Diffstat (limited to 'src/shared/install.c')
-rw-r--r--src/shared/install.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/shared/install.c b/src/shared/install.c
index 233d64b6e9..62151d99d0 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -575,7 +575,7 @@ int unit_file_mask(
STRV_FOREACH(i, files) {
_cleanup_free_ char *path = NULL;
- if (!unit_name_is_valid(*i, true)) {
+ if (!unit_name_is_valid(*i, TEMPLATE_VALID)) {
if (r == 0)
r = -EINVAL;
continue;
@@ -643,7 +643,7 @@ int unit_file_unmask(
STRV_FOREACH(i, files) {
char *path;
- if (!unit_name_is_valid(*i, true)) {
+ if (!unit_name_is_valid(*i, TEMPLATE_VALID)) {
if (r == 0)
r = -EINVAL;
continue;
@@ -719,7 +719,7 @@ int unit_file_link(
fn = basename(*i);
if (!path_is_absolute(*i) ||
- !unit_name_is_valid(fn, true)) {
+ !unit_name_is_valid(fn, TEMPLATE_VALID)) {
if (r == 0)
r = -EINVAL;
continue;
@@ -861,7 +861,7 @@ static int install_info_add(
if (!name)
name = basename(path);
- if (!unit_name_is_valid(name, true))
+ if (!unit_name_is_valid(name, TEMPLATE_VALID))
return -EINVAL;
if (hashmap_get(c->have_installed, name) ||
@@ -1235,7 +1235,7 @@ static int install_info_symlink_wants(
if (q < 0)
return q;
- if (!unit_name_is_valid(dst, true)) {
+ if (!unit_name_is_valid(dst, TEMPLATE_VALID)) {
r = -EINVAL;
continue;
}
@@ -1272,7 +1272,7 @@ static int install_info_symlink_requires(
if (q < 0)
return q;
- if (!unit_name_is_valid(dst, true)) {
+ if (!unit_name_is_valid(dst, TEMPLATE_VALID)) {
r = -EINVAL;
continue;
}
@@ -1675,7 +1675,7 @@ UnitFileState unit_file_get_state(
if (root_dir && scope != UNIT_FILE_SYSTEM)
return -EINVAL;
- if (!unit_name_is_valid(name, true))
+ if (!unit_name_is_valid(name, TEMPLATE_VALID))
return -EINVAL;
r = lookup_paths_init_from_scope(&paths, scope);
@@ -1845,7 +1845,7 @@ int unit_file_preset(
STRV_FOREACH(i, files) {
- if (!unit_name_is_valid(*i, true))
+ if (!unit_name_is_valid(*i, TEMPLATE_VALID))
return -EINVAL;
r = unit_file_query_preset(scope, *i);
@@ -1949,7 +1949,7 @@ int unit_file_get_list(
if (ignore_file(de->d_name))
continue;
- if (!unit_name_is_valid(de->d_name, true))
+ if (!unit_name_is_valid(de->d_name, TEMPLATE_VALID))
continue;
if (hashmap_get(h, de->d_name))