summaryrefslogtreecommitdiffstats
path: root/src/systemctl/systemctl-start-special.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-start-special.c
parentsocket-util: fix socket_get_family() (diff)
downloadsystemd-4870133bfaaf97189a970a29bf47e0e38fa721aa.tar.xz
systemd-4870133bfaaf97189a970a29bf47e0e38fa721aa.zip
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-start-special.c')
-rw-r--r--src/systemctl/systemctl-start-special.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/systemctl/systemctl-start-special.c b/src/systemctl/systemctl-start-special.c
index fdf2cdfd05..90b1e2ae0d 100644
--- a/src/systemctl/systemctl-start-special.c
+++ b/src/systemctl/systemctl-start-special.c
@@ -235,10 +235,10 @@ int verb_start_special(int argc, char *argv[], void *userdata) {
int verb_start_system_special(int argc, char *argv[], void *userdata) {
/* Like start_special above, but raises an error when running in user mode */
- if (arg_scope != LOOKUP_SCOPE_SYSTEM)
+ if (arg_runtime_scope != RUNTIME_SCOPE_SYSTEM)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"Bad action for %s mode.",
- arg_scope == LOOKUP_SCOPE_GLOBAL ? "--global" : "--user");
+ arg_runtime_scope == RUNTIME_SCOPE_GLOBAL ? "--global" : "--user");
return verb_start_special(argc, argv, userdata);
}