summaryrefslogtreecommitdiff
path: root/src/systemctl/systemctl.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/systemctl/systemctl.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/systemctl/systemctl.c')
-rw-r--r--src/systemctl/systemctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index bab34986e3..3fd44a01d4 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -4810,7 +4810,7 @@ static int cat(int argc, char *argv[], void *userdata) {
return -EINVAL;
}
- r = lookup_paths_init_from_scope(&lp, arg_scope, arg_root);
+ r = lookup_paths_init(&lp, arg_scope, arg_root);
if (r < 0)
return log_error_errno(r, "Failed to determine unit paths: %m");
@@ -5241,7 +5241,7 @@ static int enable_sysv_units(const char *verb, char **args) {
/* Processes all SysV units, and reshuffles the array so that
* afterwards only the native units remain */
- r = lookup_paths_init(&paths, MANAGER_SYSTEM, false, arg_root);
+ r = lookup_paths_init(&paths, arg_scope, arg_root);
if (r < 0)
return r;
@@ -6074,7 +6074,7 @@ static int find_paths_to_edit(sd_bus *bus, char **names, char ***paths) {
assert(names);
assert(paths);
- r = lookup_paths_init_from_scope(&lp, arg_scope, arg_root);
+ r = lookup_paths_init(&lp, arg_scope, arg_root);
if (r < 0)
return r;