summaryrefslogtreecommitdiffstats
path: root/src/core/unit-printf.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/core/unit-printf.c
parentsystemctl: port systemctl over to the new LookupPaths configuration directory... (diff)
downloadsystemd-463d0d15690c7abe2172a23ae23c5547693dd71f.tar.xz
systemd-463d0d15690c7abe2172a23ae23c5547693dd71f.zip
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/core/unit-printf.c')
-rw-r--r--src/core/unit-printf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/unit-printf.c b/src/core/unit-printf.c
index fc057d965c..40da52fcac 100644
--- a/src/core/unit-printf.c
+++ b/src/core/unit-printf.c
@@ -140,7 +140,7 @@ static int specifier_runtime(char specifier, void *data, void *userdata, char **
assert(u);
- if (u->manager->running_as == MANAGER_SYSTEM)
+ if (MANAGER_IS_SYSTEM(u->manager))
e = "/run";
else {
e = getenv("XDG_RUNTIME_DIR");