diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-04-10 14:43:06 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-04-10 16:23:46 +0200 |
commit | 2ff7b0a54271c8480024d6d68edff4a92e781052 (patch) | |
tree | 4883cb0ad40483553e06d10a209475f757f273c8 /src/tmpfiles/tmpfiles.c | |
parent | 6dd67163b8f173649e7dc73740f35274714caafc (diff) |
util: unify how we parse mode_t strings
Diffstat (limited to 'src/tmpfiles/tmpfiles.c')
-rw-r--r-- | src/tmpfiles/tmpfiles.c | 4 |
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; |