summaryrefslogtreecommitdiff
path: root/src/systemctl/systemctl-sysv-compat.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-03-10 09:47:10 +0100
committerLennart Poettering <lennart@poettering.net>2023-03-10 09:47:39 +0100
commit4870133bfaaf97189a970a29bf47e0e38fa721aa (patch)
treed2fa9a5699a8b4c948179afabf3da2f9da322ce5 /src/systemctl/systemctl-sysv-compat.c
parent5f64d2bf332371bdfdcb91b588e57d4c0c20428f (diff)
downloadsystemd-4870133bfaaf97189a970a29bf47e0e38fa721aa.tar.gz
basic: add RuntimeScope enum
In various tools and services we have a per-system and per-user concept. So far we sometimes used a boolean indicating whether we are in system mode, or a reversed boolean indicating whether we are in user mode, or the LookupScope enum used by the lookup path logic. Let's address that, in introduce a common enum for this, we can use all across the board. This is mostly just search/replace, no actual code changes.
Diffstat (limited to 'src/systemctl/systemctl-sysv-compat.c')
-rw-r--r--src/systemctl/systemctl-sysv-compat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/systemctl/systemctl-sysv-compat.c b/src/systemctl/systemctl-sysv-compat.c
index fc73830a07..1bc76031f4 100644
--- a/src/systemctl/systemctl-sysv-compat.c
+++ b/src/systemctl/systemctl-sysv-compat.c
@@ -117,7 +117,7 @@ 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 */
- if (arg_scope != LOOKUP_SCOPE_SYSTEM)
+ if (arg_runtime_scope != RUNTIME_SCOPE_SYSTEM)
return 0;
if (getenv_bool("SYSTEMCTL_SKIP_SYSV") > 0)
@@ -129,7 +129,7 @@ int enable_sysv_units(const char *verb, char **args) {
"is-enabled"))
return 0;
- r = lookup_paths_init_or_warn(&paths, arg_scope, LOOKUP_PATHS_EXCLUDE_GENERATED, arg_root);
+ r = lookup_paths_init_or_warn(&paths, arg_runtime_scope, LOOKUP_PATHS_EXCLUDE_GENERATED, arg_root);
if (r < 0)
return r;
@@ -159,7 +159,7 @@ int enable_sysv_units(const char *verb, char **args) {
if (path_is_absolute(name))
continue;
- j = unit_file_exists(arg_scope, &paths, name);
+ j = unit_file_exists(arg_runtime_scope, &paths, name);
if (j < 0 && !IN_SET(j, -ELOOP, -ERFKILL, -EADDRNOTAVAIL))
return log_error_errno(j, "Failed to look up unit file state: %m");
found_native = j != 0;