summaryrefslogtreecommitdiffstats
path: root/src/tmpfiles/tmpfiles.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 18:51:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 18:51:16 +0000
commit77df77b863b35aa00a5b8e3d63e4dfb094b0aef9 (patch)
tree76580546179a403e346084143bd92393474e71be /src/tmpfiles/tmpfiles.c
parentAdding upstream version 252.22. (diff)
downloadsystemd-77df77b863b35aa00a5b8e3d63e4dfb094b0aef9.tar.xz
systemd-77df77b863b35aa00a5b8e3d63e4dfb094b0aef9.zip
Adding upstream version 252.23.upstream/252.23
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/tmpfiles/tmpfiles.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 9c3d994..281284c 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -3809,10 +3809,12 @@ static int parse_argv(int argc, char *argv[]) {
break;
case ARG_REPLACE:
- if (!path_is_absolute(optarg) ||
- !endswith(optarg, ".conf"))
+ if (!path_is_absolute(optarg))
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
- "The argument to --replace= must an absolute path to a config file");
+ "The argument to --replace= must be an absolute path.");
+ if (!endswith(optarg, ".conf"))
+ return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
+ "The argument to --replace= must have the extension '.conf'.");
arg_replace = optarg;
break;