conf-parser: distinguish between multiple sections with the same name

Pass on the line on which a section was decleared to the parsers, so they
can distinguish between multiple sections (if they chose to). Currently
no parsers take advantage of this, but a follow-up patch will do that
to distinguish

[Address]
Address=192.168.0.1/24
Label=one

[Address]
Address=192.168.0.2/24
Label=two

from

[Address]
Address=192.168.0.1/24
Label=one
Address=192.168.0.2/24
Label=two
This commit is contained in:
Tom Gundersen
2013-11-25 19:35:44 +01:00
parent c5ab2e02dc
commit 71a6151083
16 changed files with 183 additions and 106 deletions
+2
View File
@@ -922,6 +922,7 @@ static int config_parse_also(const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
@@ -957,6 +958,7 @@ static int config_parse_user(const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,