diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-07-20 14:19:57 +0200 |
---|---|---|
committer | Martin Pitt <martinpitt@users.noreply.github.com> | 2017-07-20 14:19:57 +0200 |
commit | fccb44863b6084dcb323ee1d97682a142e785d50 (patch) | |
tree | 8936ba99f8273bcee9a20ee4bdf845fd78425bd2 | |
parent | 708d423915c4ea48d408b5a3395c11055247b9bc (diff) | |
download | systemd-fccb44863b6084dcb323ee1d97682a142e785d50.tar.gz |
sd-path: make sure to use tmp_dir() and var_tmp_dir() (#6397)
Let's reuse the common code wherever appropriate.
-rw-r--r-- | src/libsystemd/sd-path/sd-path.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libsystemd/sd-path/sd-path.c b/src/libsystemd/sd-path/sd-path.c index 752c1ba56b..6e41dac1ad 100644 --- a/src/libsystemd/sd-path/sd-path.c +++ b/src/libsystemd/sd-path/sd-path.c @@ -23,6 +23,7 @@ #include "architecture.h" #include "fd-util.h" #include "fileio.h" +#include "fs-util.h" #include "missing.h" #include "path-util.h" #include "string-util.h" @@ -219,10 +220,10 @@ static int get_path(uint64_t type, char **buffer, const char **ret) { switch (type) { case SD_PATH_TEMPORARY: - return from_environment("TMPDIR", "/tmp", ret); + return tmp_dir(ret); case SD_PATH_TEMPORARY_LARGE: - return from_environment("TMPDIR", "/var/tmp", ret); + return var_tmp_dir(ret); case SD_PATH_SYSTEM_BINARIES: *ret = "/usr/bin"; |