summaryrefslogtreecommitdiff
path: root/src/tmpfiles
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-05-13 17:42:10 +0200
committerLennart Poettering <lennart@poettering.net>2015-05-13 17:42:10 +0200
commit1d13f648d0fade38194db74b4f82ca68c8a26856 (patch)
treeb85c22b0007e0c8c6e612b8c9f5606bcd84f0451 /src/tmpfiles
parent8b44a3d22c1fdfc5ce5fcb77e38a90ec02ba8019 (diff)
util: add generic calls for prefixing a root directory to a path
So far a number of utilities implemented their own calls for this, unify them in prefix_root() and prefix_roota(). The former uses heap memory, the latter allocates from the stack via alloca(). Port over most users of a --root= logic.
Diffstat (limited to 'src/tmpfiles')
-rw-r--r--src/tmpfiles/tmpfiles.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 640ad4788d..5a578350a3 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -1926,7 +1926,7 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
if (arg_root) {
char *p;
- p = strappend(arg_root, i.path);
+ p = prefix_root(arg_root, i.path);
if (!p)
return log_oom();