From 71a6151083d842b2f5bf04e50239f0bf85d34d2e Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Tue, 19 Nov 2013 16:17:55 +0100 Subject: 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 --- src/journal/journald-server.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/journal/journald-server.h') diff --git a/src/journal/journald-server.h b/src/journal/journald-server.h index 069cd173c8..db577b8913 100644 --- a/src/journal/journald-server.h +++ b/src/journal/journald-server.h @@ -133,12 +133,12 @@ void server_driver_message(Server *s, sd_id128_t message_id, const char *format, /* gperf lookup function */ const struct ConfigPerfItem* journald_gperf_lookup(const char *key, unsigned length); -int config_parse_storage(const char *unit, const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); +int config_parse_storage(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); const char *storage_to_string(Storage s) _const_; Storage storage_from_string(const char *s) _pure_; -int config_parse_split_mode(const char *unit, const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); +int config_parse_split_mode(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); const char *split_mode_to_string(SplitMode s) _const_; SplitMode split_mode_from_string(const char *s) _pure_; -- cgit v1.2.3-54-g00ecf