summaryrefslogtreecommitdiff
path: root/src/core/unit-printf.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-02-25 00:30:32 +0100
committerLennart Poettering <lennart@poettering.net>2016-04-12 13:43:30 +0200
commit92dd7c49659a0bb4c8e081199e4ff4351f37397a (patch)
tree3754290b73d4718a3f25b7042302bc8fb6f2d3f6 /src/core/unit-printf.c
parente4bb56c7a946190c348a3c686af6cb35661fa5fe (diff)
core: reuse manager_get_runtime_prefix() at more places
Diffstat (limited to 'src/core/unit-printf.c')
-rw-r--r--src/core/unit-printf.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/core/unit-printf.c b/src/core/unit-printf.c
index 40da52fcac..f11df42af3 100644
--- a/src/core/unit-printf.c
+++ b/src/core/unit-printf.c
@@ -140,14 +140,9 @@ static int specifier_runtime(char specifier, void *data, void *userdata, char **
assert(u);
- if (MANAGER_IS_SYSTEM(u->manager))
- e = "/run";
- else {
- e = getenv("XDG_RUNTIME_DIR");
- if (!e)
- return -EOPNOTSUPP;
- }
-
+ e = manager_get_runtime_prefix(u->manager);
+ if (!e)
+ return -EOPNOTSUPP;
n = strdup(e);
if (!n)
return -ENOMEM;