tmpfiles: warn if we get an argument on lines that don't take any

This commit is contained in:
Lennart Poettering 2015-04-10 14:46:05 +02:00
parent 3ea40b7810
commit c82500c6fb
1 changed files with 7 additions and 2 deletions

View File

@ -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: