summaryrefslogtreecommitdiff
path: root/src/shared/install.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-02-24 21:24:23 +0100
committerLennart Poettering <lennart@poettering.net>2016-04-12 13:43:30 +0200
commit463d0d15690c7abe2172a23ae23c5547693dd71f (patch)
treedd3410341fefada4758bf935ee1db9f680620ebf /src/shared/install.c
parentc51932be73e9cfc96e7bcaea1b31347133e1f3ed (diff)
core: remove ManagerRunningAs enum
Previously, we had two enums ManagerRunningAs and UnitFileScope, that were mostly identical and converted from one to the other all the time. The latter had one more value UNIT_FILE_GLOBAL however. Let's simplify things, and remove ManagerRunningAs and replace it by UnitFileScope everywhere, thus making the translation unnecessary. Introduce two new macros MANAGER_IS_SYSTEM() and MANAGER_IS_USER() to simplify checking if we are running in one or the user context.
Diffstat (limited to 'src/shared/install.c')
-rw-r--r--src/shared/install.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/shared/install.c b/src/shared/install.c
index 2cec6ba76f..f802343399 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -1442,7 +1442,7 @@ int unit_file_mask(
if (r < 0)
return r;
- r = lookup_paths_init_from_scope(&paths, scope, root_dir);
+ r = lookup_paths_init(&paths, scope, root_dir);
if (r < 0)
return r;
@@ -1493,7 +1493,7 @@ int unit_file_unmask(
if (r < 0)
return r;
- r = lookup_paths_init_from_scope(&paths, scope, root_dir);
+ r = lookup_paths_init(&paths, scope, root_dir);
if (r < 0)
return r;
@@ -1575,7 +1575,7 @@ int unit_file_link(
if (r < 0)
return r;
- r = lookup_paths_init_from_scope(&paths, scope, root_dir);
+ r = lookup_paths_init(&paths, scope, root_dir);
if (r < 0)
return r;
@@ -1668,7 +1668,7 @@ int unit_file_add_dependency(
if (r < 0)
return r;
- r = lookup_paths_init_from_scope(&paths, scope, root_dir);
+ r = lookup_paths_init(&paths, scope, root_dir);
if (r < 0)
return r;
@@ -1738,7 +1738,7 @@ int unit_file_enable(
if (r < 0)
return r;
- r = lookup_paths_init_from_scope(&paths, scope, root_dir);
+ r = lookup_paths_init(&paths, scope, root_dir);
if (r < 0)
return r;
@@ -1786,7 +1786,7 @@ int unit_file_disable(
if (r < 0)
return r;
- r = lookup_paths_init_from_scope(&paths, scope, root_dir);
+ r = lookup_paths_init(&paths, scope, root_dir);
if (r < 0)
return r;
@@ -1863,7 +1863,7 @@ int unit_file_set_default(
if (r < 0)
return r;
- r = lookup_paths_init_from_scope(&paths, scope, root_dir);
+ r = lookup_paths_init(&paths, scope, root_dir);
if (r < 0)
return r;
@@ -1899,7 +1899,7 @@ int unit_file_get_default(
if (r < 0)
return r;
- r = lookup_paths_init_from_scope(&paths, scope, root_dir);
+ r = lookup_paths_init(&paths, scope, root_dir);
if (r < 0)
return r;
@@ -2001,7 +2001,7 @@ int unit_file_get_state(
if (r < 0)
return r;
- r = lookup_paths_init_from_scope(&paths, scope, root_dir);
+ r = lookup_paths_init(&paths, scope, root_dir);
if (r < 0)
return r;
@@ -2203,7 +2203,7 @@ int unit_file_preset(
if (r < 0)
return r;
- r = lookup_paths_init_from_scope(&paths, scope, root_dir);
+ r = lookup_paths_init(&paths, scope, root_dir);
if (r < 0)
return r;
@@ -2244,7 +2244,7 @@ int unit_file_preset_all(
if (r < 0)
return r;
- r = lookup_paths_init_from_scope(&paths, scope, root_dir);
+ r = lookup_paths_init(&paths, scope, root_dir);
if (r < 0)
return r;
@@ -2322,7 +2322,7 @@ int unit_file_get_list(
if (r < 0)
return r;
- r = lookup_paths_init_from_scope(&paths, scope, root_dir);
+ r = lookup_paths_init(&paths, scope, root_dir);
if (r < 0)
return r;