summaryrefslogtreecommitdiff
path: root/src/tmpfiles/tmpfiles.c
diff options
context:
space:
mode:
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 '?':