chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b19be9e
)
conf-parser: warn if an assignment is place outside of a section
author
Lennart Poettering
<lennart@poettering.net>
Tue, 13 Mar 2012 01:41:29 +0000
(
02:41
+0100)
committer
Lennart 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
patch
|
blob
|
history
diff --git
a/src/conf-parser.c
b/src/conf-parser.c
index 135b175c09a5dd4a5d939a34c41bf01b1121f39a..a9b01135e6a1dfc7a3bcbd335b6d59c1a21cb7be 100644
(file)
--- a/
src/conf-parser.c
+++ b/
src/conf-parser.c
@@
-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) {