]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tmpfiles: warn if we get an argument on lines that don't take any
authorLennart Poettering <lennart@poettering.net>
Fri, 10 Apr 2015 12:46:05 +0000 (14:46 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 10 Apr 2015 14:23:46 +0000 (16:23 +0200)
src/tmpfiles/tmpfiles.c

index 24a0d36842846328ae1c4737a2047f1b0fef5309..6b95c4dc025b9b00f042653b7cd736d729a3ce9c 100644 (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: