summaryrefslogtreecommitdiff
path: root/src/tmpfiles/tmpfiles.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-10-25 14:22:43 +0100
committerTom Gundersen <teg@jklm.no>2015-10-25 14:22:43 +0100
commit7c8871d31510865e40c8628ef765996202a3cc00 (patch)
tree622b7aa085999fe3d2908772ff0d0c6ec5bf4400 /src/tmpfiles/tmpfiles.c
parent7c257428969aaba2acc4e26753c86d6f4774354a (diff)
parentf00022dd121c73b543ae667ddce9814bd67a1b73 (diff)
Merge pull request #1654 from poettering/util-lib
Various changes to src/basic/
Diffstat (limited to 'src/tmpfiles/tmpfiles.c')
-rw-r--r--src/tmpfiles/tmpfiles.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 09b6ca5c2c..e574e5ac26 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -43,6 +43,8 @@
#include "capability.h"
#include "conf-files.h"
#include "copy.h"
+#include "escape.h"
+#include "fd-util.h"
#include "formats-util.h"
#include "label.h"
#include "log.h"
@@ -54,6 +56,7 @@
#include "selinux-util.h"
#include "set.h"
#include "specifier.h"
+#include "string-util.h"
#include "strv.h"
#include "util.h"
@@ -2101,7 +2104,7 @@ static int parse_argv(int argc, char *argv[]) {
{}
};
- int c;
+ int c, r;
assert(argc >= 0);
assert(argv);
@@ -2144,12 +2147,9 @@ static int parse_argv(int argc, char *argv[]) {
break;
case ARG_ROOT:
- free(arg_root);
- arg_root = path_make_absolute_cwd(optarg);
- if (!arg_root)
- return log_oom();
-
- path_kill_slashes(arg_root);
+ r = parse_path_argument_and_warn(optarg, true, &arg_root);
+ if (r < 0)
+ return r;
break;
case '?':