]> err.no Git - systemd/commitdiff
conf-parser: warn if an assignment is place outside of a section
authorLennart Poettering <lennart@poettering.net>
Tue, 13 Mar 2012 01:41:29 +0000 (02:41 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 13 Mar 2012 01:41:29 +0000 (02:41 +0100)
https://bugzilla.redhat.com/show_bug.cgi?id=783134

src/conf-parser.c

index 135b175c09a5dd4a5d939a34c41bf01b1121f39a..a9b01135e6a1dfc7a3bcbd335b6d59c1a21cb7be 100644 (file)
@@ -219,8 +219,13 @@ static int parse_line(
                 return 0;
         }
 
-        if (sections && !*section)
+        if (sections && !*section) {
+
+                if (!relaxed)
+                        log_info("[%s:%u] Assignment outside of section. Ignoring.", filename, line);
+
                 return 0;
+        }
 
         e = strchr(l, '=');
         if (!e) {