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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index d34de70e1d..ce4a10aa86 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -1879,9 +1879,9 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
mm++;
}
- if (sscanf(mm, "%o", &m) != 1) {
+ if (parse_mode(mm, &m) < 0) {
log_error("[%s:%u] Invalid mode '%s'.", fname, line, mode);
- return -ENOENT;
+ return -EBADMSG;
}
i.mode = m;