From: Lennart Poettering Date: Fri, 10 Apr 2015 12:46:05 +0000 (+0200) Subject: tmpfiles: warn if we get an argument on lines that don't take any X-Git-Tag: v220~500 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c82500c6fb37a25bc3c4b1e0be11a90a395619d9;p=thirdparty%2Fsystemd.git tmpfiles: warn if we get an argument on lines that don't take any --- diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 24a0d368428..6b95c4dc025 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -1727,8 +1727,6 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { switch (i.type) { - case CREATE_FILE: - case TRUNCATE_FILE: case CREATE_DIRECTORY: case CREATE_SUBVOLUME: case TRUNCATE_DIRECTORY: @@ -1740,6 +1738,13 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { case ADJUST_MODE: case RELABEL_PATH: case RECURSIVE_RELABEL_PATH: + if (i.argument) + log_warning("[%s:%u] %c lines don't take argument field, ignoring.", fname, line, i.type); + + break; + + case CREATE_FILE: + case TRUNCATE_FILE: break; case CREATE_SYMLINK: