chiark / gitweb /
conf-parser: distinguish between multiple sections with the same name
authorTom Gundersen <teg@jklm.no>
Tue, 19 Nov 2013 15:17:55 +0000 (16:17 +0100)
committerTom Gundersen <teg@jklm.no>
Mon, 25 Nov 2013 18:35:44 +0000 (19:35 +0100)
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

16 files changed:
src/core/load-fragment.c
src/core/load-fragment.h
src/core/main.c
src/journal/journald-server.h
src/login/logind-action.h
src/network/networkd-address.c
src/network/networkd-route.c
src/network/networkd.h
src/shared/conf-parser.c
src/shared/conf-parser.h
src/shared/install.c
src/shared/net-util.c
src/shared/net-util.h
src/test/test-unit-file.c
src/udev/net/ethtool-util.h
src/udev/net/link-config.h

index 110f7fbb6e23f70e53a342cb8e0a0b246a538833..e9bfbd396d6c407dfe87dda5c13ae57b0e6afecb 100644 (file)
@@ -58,6 +58,7 @@ int config_parse_warn_compat(const char *unit,
                              const char *filename,
                              unsigned line,
                              const char *section,
                              const char *filename,
                              unsigned line,
                              const char *section,
+                             unsigned section_line,
                              const char *lvalue,
                              int ltype,
                              const char *rvalue,
                              const char *lvalue,
                              int ltype,
                              const char *rvalue,
@@ -75,6 +76,7 @@ int config_parse_unit_deps(const char* unit,
                            const char *filename,
                            unsigned line,
                            const char *section,
                            const char *filename,
                            unsigned line,
                            const char *section,
+                           unsigned section_line,
                            const char *lvalue,
                            int ltype,
                            const char *rvalue,
                            const char *lvalue,
                            int ltype,
                            const char *rvalue,
@@ -119,6 +121,7 @@ int config_parse_unit_string_printf(const char *unit,
                                     const char *filename,
                                     unsigned line,
                                     const char *section,
                                     const char *filename,
                                     unsigned line,
                                     const char *section,
+                                    unsigned section_line,
                                     const char *lvalue,
                                     int ltype,
                                     const char *rvalue,
                                     const char *lvalue,
                                     int ltype,
                                     const char *rvalue,
@@ -139,7 +142,7 @@ int config_parse_unit_string_printf(const char *unit,
                 log_syntax(unit, LOG_ERR, filename, line, -r,
                            "Failed to resolve unit specifiers on %s, ignoring: %s", rvalue, strerror(-r));
 
                 log_syntax(unit, LOG_ERR, filename, line, -r,
                            "Failed to resolve unit specifiers on %s, ignoring: %s", rvalue, strerror(-r));
 
-        return config_parse_string(unit, filename, line, section, lvalue, ltype,
+        return config_parse_string(unit, filename, line, section, section_line, lvalue, ltype,
                                    k ? k : rvalue, data, userdata);
 }
 
                                    k ? k : rvalue, data, userdata);
 }
 
@@ -147,6 +150,7 @@ int config_parse_unit_strv_printf(const char *unit,
                                   const char *filename,
                                   unsigned line,
                                   const char *section,
                                   const char *filename,
                                   unsigned line,
                                   const char *section,
+                                  unsigned section_line,
                                   const char *lvalue,
                                   int ltype,
                                   const char *rvalue,
                                   const char *lvalue,
                                   int ltype,
                                   const char *rvalue,
@@ -167,7 +171,7 @@ int config_parse_unit_strv_printf(const char *unit,
                 log_syntax(unit, LOG_ERR, filename, line, -r,
                            "Failed to resolve unit specifiers on %s, ignoring: %s", rvalue, strerror(-r));
 
                 log_syntax(unit, LOG_ERR, filename, line, -r,
                            "Failed to resolve unit specifiers on %s, ignoring: %s", rvalue, strerror(-r));
 
-        return config_parse_strv(unit, filename, line, section, lvalue, ltype,
+        return config_parse_strv(unit, filename, line, section, section_line, lvalue, ltype,
                                  k ? k : rvalue, data, userdata);
 }
 
                                  k ? k : rvalue, data, userdata);
 }
 
@@ -175,6 +179,7 @@ int config_parse_unit_path_printf(const char *unit,
                                   const char *filename,
                                   unsigned line,
                                   const char *section,
                                   const char *filename,
                                   unsigned line,
                                   const char *section,
+                                  unsigned section_line,
                                   const char *lvalue,
                                   int ltype,
                                   const char *rvalue,
                                   const char *lvalue,
                                   int ltype,
                                   const char *rvalue,
@@ -195,7 +200,7 @@ int config_parse_unit_path_printf(const char *unit,
                 log_syntax(unit, LOG_ERR, filename, line, -r,
                            "Failed to resolve unit specifiers on %s, ignoring: %s", rvalue, strerror(-r));
 
                 log_syntax(unit, LOG_ERR, filename, line, -r,
                            "Failed to resolve unit specifiers on %s, ignoring: %s", rvalue, strerror(-r));
 
-        return config_parse_path(unit, filename, line, section, lvalue, ltype,
+        return config_parse_path(unit, filename, line, section, section_line, lvalue, ltype,
                                  k ? k : rvalue, data, userdata);
 }
 
                                  k ? k : rvalue, data, userdata);
 }
 
@@ -203,6 +208,7 @@ int config_parse_socket_listen(const char *unit,
                                const char *filename,
                                unsigned line,
                                const char *section,
                                const char *filename,
                                unsigned line,
                                const char *section,
+                               unsigned section_line,
                                const char *lvalue,
                                int ltype,
                                const char *rvalue,
                                const char *lvalue,
                                int ltype,
                                const char *rvalue,
@@ -313,6 +319,7 @@ int config_parse_socket_bind(const char *unit,
                              const char *filename,
                              unsigned line,
                              const char *section,
                              const char *filename,
                              unsigned line,
                              const char *section,
+                             unsigned section_line,
                              const char *lvalue,
                              int ltype,
                              const char *rvalue,
                              const char *lvalue,
                              int ltype,
                              const char *rvalue,
@@ -351,6 +358,7 @@ int config_parse_exec_nice(const char *unit,
                            const char *filename,
                            unsigned line,
                            const char *section,
                            const char *filename,
                            unsigned line,
                            const char *section,
+                           unsigned section_line,
                            const char *lvalue,
                            int ltype,
                            const char *rvalue,
                            const char *lvalue,
                            int ltype,
                            const char *rvalue,
@@ -388,6 +396,7 @@ int config_parse_exec_oom_score_adjust(const char* unit,
                                        const char *filename,
                                        unsigned line,
                                        const char *section,
                                        const char *filename,
                                        unsigned line,
                                        const char *section,
+                                       unsigned section_line,
                                        const char *lvalue,
                                        int ltype,
                                        const char *rvalue,
                                        const char *lvalue,
                                        int ltype,
                                        const char *rvalue,
@@ -425,6 +434,7 @@ int config_parse_exec(const char *unit,
                       const char *filename,
                       unsigned line,
                       const char *section,
                       const char *filename,
                       unsigned line,
                       const char *section,
+                      unsigned section_line,
                       const char *lvalue,
                       int ltype,
                       const char *rvalue,
                       const char *lvalue,
                       int ltype,
                       const char *rvalue,
@@ -596,6 +606,7 @@ int config_parse_socket_bindtodevice(const char* unit,
                                      const char *filename,
                                      unsigned line,
                                      const char *section,
                                      const char *filename,
                                      unsigned line,
                                      const char *section,
+                                     unsigned section_line,
                                      const char *lvalue,
                                      int ltype,
                                      const char *rvalue,
                                      const char *lvalue,
                                      int ltype,
                                      const char *rvalue,
@@ -630,6 +641,7 @@ int config_parse_exec_io_class(const char *unit,
                                const char *filename,
                                unsigned line,
                                const char *section,
                                const char *filename,
                                unsigned line,
                                const char *section,
+                               unsigned section_line,
                                const char *lvalue,
                                int ltype,
                                const char *rvalue,
                                const char *lvalue,
                                int ltype,
                                const char *rvalue,
@@ -661,6 +673,7 @@ int config_parse_exec_io_priority(const char *unit,
                                   const char *filename,
                                   unsigned line,
                                   const char *section,
                                   const char *filename,
                                   unsigned line,
                                   const char *section,
+                                  unsigned section_line,
                                   const char *lvalue,
                                   int ltype,
                                   const char *rvalue,
                                   const char *lvalue,
                                   int ltype,
                                   const char *rvalue,
@@ -692,6 +705,7 @@ int config_parse_exec_cpu_sched_policy(const char *unit,
                                        const char *filename,
                                        unsigned line,
                                        const char *section,
                                        const char *filename,
                                        unsigned line,
                                        const char *section,
+                                       unsigned section_line,
                                        const char *lvalue,
                                        int ltype,
                                        const char *rvalue,
                                        const char *lvalue,
                                        int ltype,
                                        const char *rvalue,
@@ -726,6 +740,7 @@ int config_parse_exec_cpu_sched_prio(const char *unit,
                                      const char *filename,
                                      unsigned line,
                                      const char *section,
                                      const char *filename,
                                      unsigned line,
                                      const char *section,
+                                     unsigned section_line,
                                      const char *lvalue,
                                      int ltype,
                                      const char *rvalue,
                                      const char *lvalue,
                                      int ltype,
                                      const char *rvalue,
@@ -767,6 +782,7 @@ int config_parse_exec_cpu_affinity(const char *unit,
                                    const char *filename,
                                    unsigned line,
                                    const char *section,
                                    const char *filename,
                                    unsigned line,
                                    const char *section,
+                                   unsigned section_line,
                                    const char *lvalue,
                                    int ltype,
                                    const char *rvalue,
                                    const char *lvalue,
                                    int ltype,
                                    const char *rvalue,
@@ -824,6 +840,7 @@ int config_parse_exec_capabilities(const char *unit,
                                    const char *filename,
                                    unsigned line,
                                    const char *section,
                                    const char *filename,
                                    unsigned line,
                                    const char *section,
+                                   unsigned section_line,
                                    const char *lvalue,
                                    int ltype,
                                    const char *rvalue,
                                    const char *lvalue,
                                    int ltype,
                                    const char *rvalue,
@@ -856,6 +873,7 @@ int config_parse_exec_secure_bits(const char *unit,
                                   const char *filename,
                                   unsigned line,
                                   const char *section,
                                   const char *filename,
                                   unsigned line,
                                   const char *section,
+                                  unsigned section_line,
                                   const char *lvalue,
                                   int ltype,
                                   const char *rvalue,
                                   const char *lvalue,
                                   int ltype,
                                   const char *rvalue,
@@ -905,6 +923,7 @@ int config_parse_bounding_set(const char *unit,
                               const char *filename,
                               unsigned line,
                               const char *section,
                               const char *filename,
                               unsigned line,
                               const char *section,
+                              unsigned section_line,
                               const char *lvalue,
                               int ltype,
                               const char *rvalue,
                               const char *lvalue,
                               int ltype,
                               const char *rvalue,
@@ -964,6 +983,7 @@ int config_parse_limit(const char *unit,
                        const char *filename,
                        unsigned line,
                        const char *section,
                        const char *filename,
                        unsigned line,
                        const char *section,
+                       unsigned section_line,
                        const char *lvalue,
                        int ltype,
                        const char *rvalue,
                        const char *lvalue,
                        int ltype,
                        const char *rvalue,
@@ -1008,6 +1028,7 @@ int config_parse_sysv_priority(const char *unit,
                                const char *filename,
                                unsigned line,
                                const char *section,
                                const char *filename,
                                unsigned line,
                                const char *section,
+                               unsigned section_line,
                                const char *lvalue,
                                int ltype,
                                const char *rvalue,
                                const char *lvalue,
                                int ltype,
                                const char *rvalue,
@@ -1040,6 +1061,7 @@ int config_parse_kill_signal(const char *unit,
                              const char *filename,
                              unsigned line,
                              const char *section,
                              const char *filename,
                              unsigned line,
                              const char *section,
+                             unsigned section_line,
                              const char *lvalue,
                              int ltype,
                              const char *rvalue,
                              const char *lvalue,
                              int ltype,
                              const char *rvalue,
@@ -1069,6 +1091,7 @@ int config_parse_exec_mount_flags(const char *unit,
                                   const char *filename,
                                   unsigned line,
                                   const char *section,
                                   const char *filename,
                                   unsigned line,
                                   const char *section,
+                                  unsigned section_line,
                                   const char *lvalue,
                                   int ltype,
                                   const char *rvalue,
                                   const char *lvalue,
                                   int ltype,
                                   const char *rvalue,
@@ -1115,6 +1138,7 @@ int config_parse_timer(const char *unit,
                        const char *filename,
                        unsigned line,
                        const char *section,
                        const char *filename,
                        unsigned line,
                        const char *section,
+                       unsigned section_line,
                        const char *lvalue,
                        int ltype,
                        const char *rvalue,
                        const char *lvalue,
                        int ltype,
                        const char *rvalue,
@@ -1185,6 +1209,7 @@ int config_parse_trigger_unit(
                 const char *filename,
                 unsigned line,
                 const char *section,
                 const char *filename,
                 unsigned line,
                 const char *section,
+                unsigned section_line,
                 const char *lvalue,
                 int ltype,
                 const char *rvalue,
                 const char *lvalue,
                 int ltype,
                 const char *rvalue,
@@ -1239,6 +1264,7 @@ int config_parse_path_spec(const char *unit,
                            const char *filename,
                            unsigned line,
                            const char *section,
                            const char *filename,
                            unsigned line,
                            const char *section,
+                           unsigned section_line,
                            const char *lvalue,
                            int ltype,
                            const char *rvalue,
                            const char *lvalue,
                            int ltype,
                            const char *rvalue,
@@ -1305,6 +1331,7 @@ int config_parse_socket_service(const char *unit,
                                 const char *filename,
                                 unsigned line,
                                 const char *section,
                                 const char *filename,
                                 unsigned line,
                                 const char *section,
+                                unsigned section_line,
                                 const char *lvalue,
                                 int ltype,
                                 const char *rvalue,
                                 const char *lvalue,
                                 int ltype,
                                 const char *rvalue,
@@ -1346,6 +1373,7 @@ int config_parse_service_sockets(const char *unit,
                                  const char *filename,
                                  unsigned line,
                                  const char *section,
                                  const char *filename,
                                  unsigned line,
                                  const char *section,
+                                 unsigned section_line,
                                  const char *lvalue,
                                  int ltype,
                                  const char *rvalue,
                                  const char *lvalue,
                                  int ltype,
                                  const char *rvalue,
@@ -1398,6 +1426,7 @@ int config_parse_service_timeout(const char *unit,
                                  const char *filename,
                                  unsigned line,
                                  const char *section,
                                  const char *filename,
                                  unsigned line,
                                  const char *section,
+                                 unsigned section_line,
                                  const char *lvalue,
                                  int ltype,
                                  const char *rvalue,
                                  const char *lvalue,
                                  int ltype,
                                  const char *rvalue,
@@ -1412,7 +1441,7 @@ int config_parse_service_timeout(const char *unit,
         assert(rvalue);
         assert(s);
 
         assert(rvalue);
         assert(s);
 
-        r = config_parse_sec(unit, filename, line, section, lvalue, ltype,
+        r = config_parse_sec(unit, filename, line, section, section_line, lvalue, ltype,
                              rvalue, data, userdata);
         if (r < 0)
                 return r;
                              rvalue, data, userdata);
         if (r < 0)
                 return r;
@@ -1430,6 +1459,7 @@ int config_parse_unit_env_file(const char *unit,
                                const char *filename,
                                unsigned line,
                                const char *section,
                                const char *filename,
                                unsigned line,
                                const char *section,
+                               unsigned section_line,
                                const char *lvalue,
                                int ltype,
                                const char *rvalue,
                                const char *lvalue,
                                int ltype,
                                const char *rvalue,
@@ -1477,6 +1507,7 @@ int config_parse_environ(const char *unit,
                          const char *filename,
                          unsigned line,
                          const char *section,
                          const char *filename,
                          unsigned line,
                          const char *section,
+                         unsigned section_line,
                          const char *lvalue,
                          int ltype,
                          const char *rvalue,
                          const char *lvalue,
                          int ltype,
                          const char *rvalue,
@@ -1542,6 +1573,7 @@ int config_parse_ip_tos(const char *unit,
                         const char *filename,
                         unsigned line,
                         const char *section,
                         const char *filename,
                         unsigned line,
                         const char *section,
+                        unsigned section_line,
                         const char *lvalue,
                         int ltype,
                         const char *rvalue,
                         const char *lvalue,
                         int ltype,
                         const char *rvalue,
@@ -1570,6 +1602,7 @@ int config_parse_unit_condition_path(const char *unit,
                                      const char *filename,
                                      unsigned line,
                                      const char *section,
                                      const char *filename,
                                      unsigned line,
                                      const char *section,
+                                     unsigned section_line,
                                      const char *lvalue,
                                      int ltype,
                                      const char *rvalue,
                                      const char *lvalue,
                                      int ltype,
                                      const char *rvalue,
@@ -1631,6 +1664,7 @@ int config_parse_unit_condition_string(const char *unit,
                                        const char *filename,
                                        unsigned line,
                                        const char *section,
                                        const char *filename,
                                        unsigned line,
                                        const char *section,
+                                       unsigned section_line,
                                        const char *lvalue,
                                        int ltype,
                                        const char *rvalue,
                                        const char *lvalue,
                                        int ltype,
                                        const char *rvalue,
@@ -1686,6 +1720,7 @@ int config_parse_unit_condition_null(const char *unit,
                                      const char *filename,
                                      unsigned line,
                                      const char *section,
                                      const char *filename,
                                      unsigned line,
                                      const char *section,
+                                     unsigned section_line,
                                      const char *lvalue,
                                      int ltype,
                                      const char *rvalue,
                                      const char *lvalue,
                                      int ltype,
                                      const char *rvalue,
@@ -1744,6 +1779,7 @@ int config_parse_unit_requires_mounts_for(
                 const char *filename,
                 unsigned line,
                 const char *section,
                 const char *filename,
                 unsigned line,
                 const char *section,
+                unsigned section_line,
                 const char *lvalue,
                 int ltype,
                 const char *rvalue,
                 const char *lvalue,
                 int ltype,
                 const char *rvalue,
@@ -1789,6 +1825,7 @@ int config_parse_documentation(const char *unit,
                                const char *filename,
                                unsigned line,
                                const char *section,
                                const char *filename,
                                unsigned line,
                                const char *section,
+                               unsigned section_line,
                                const char *lvalue,
                                int ltype,
                                const char *rvalue,
                                const char *lvalue,
                                int ltype,
                                const char *rvalue,
@@ -1811,7 +1848,7 @@ int config_parse_documentation(const char *unit,
                 return 0;
         }
 
                 return 0;
         }
 
-        r = config_parse_unit_strv_printf(unit, filename, line, section, lvalue, ltype,
+        r = config_parse_unit_strv_printf(unit, filename, line, section, section_line, lvalue, ltype,
                                           rvalue, data, userdata);
         if (r < 0)
                 return r;
                                           rvalue, data, userdata);
         if (r < 0)
                 return r;
@@ -1846,6 +1883,7 @@ int config_parse_syscall_filter(const char *unit,
                                 const char *filename,
                                 unsigned line,
                                 const char *section,
                                 const char *filename,
                                 unsigned line,
                                 const char *section,
+                                unsigned section_line,
                                 const char *lvalue,
                                 int ltype,
                                 const char *rvalue,
                                 const char *lvalue,
                                 int ltype,
                                 const char *rvalue,
@@ -1927,6 +1965,7 @@ int config_parse_unit_slice(
                 const char *filename,
                 unsigned line,
                 const char *section,
                 const char *filename,
                 unsigned line,
                 const char *section,
+                unsigned section_line,
                 const char *lvalue,
                 int ltype,
                 const char *rvalue,
                 const char *lvalue,
                 int ltype,
                 const char *rvalue,
@@ -1976,6 +2015,7 @@ int config_parse_cpu_shares(
                 const char *filename,
                 unsigned line,
                 const char *section,
                 const char *filename,
                 unsigned line,
                 const char *section,
+                unsigned section_line,
                 const char *lvalue,
                 int ltype,
                 const char *rvalue,
                 const char *lvalue,
                 int ltype,
                 const char *rvalue,
@@ -2011,6 +2051,7 @@ int config_parse_memory_limit(
                 const char *filename,
                 unsigned line,
                 const char *section,
                 const char *filename,
                 unsigned line,
                 const char *section,
+                unsigned section_line,
                 const char *lvalue,
                 int ltype,
                 const char *rvalue,
                 const char *lvalue,
                 int ltype,
                 const char *rvalue,
@@ -2044,6 +2085,7 @@ int config_parse_device_allow(
                 const char *filename,
                 unsigned line,
                 const char *section,
                 const char *filename,
                 unsigned line,
                 const char *section,
+                unsigned section_line,
                 const char *lvalue,
                 int ltype,
                 const char *rvalue,
                 const char *lvalue,
                 int ltype,
                 const char *rvalue,
@@ -2103,6 +2145,7 @@ int config_parse_blockio_weight(
                 const char *filename,
                 unsigned line,
                 const char *section,
                 const char *filename,
                 unsigned line,
                 const char *section,
+                unsigned section_line,
                 const char *lvalue,
                 int ltype,
                 const char *rvalue,
                 const char *lvalue,
                 int ltype,
                 const char *rvalue,
@@ -2139,6 +2182,7 @@ int config_parse_blockio_device_weight(
                 const char *filename,
                 unsigned line,
                 const char *section,
                 const char *filename,
                 unsigned line,
                 const char *section,
+                unsigned section_line,
                 const char *lvalue,
                 int ltype,
                 const char *rvalue,
                 const char *lvalue,
                 int ltype,
                 const char *rvalue,
@@ -2209,6 +2253,7 @@ int config_parse_blockio_bandwidth(
                 const char *filename,
                 unsigned line,
                 const char *section,
                 const char *filename,
                 unsigned line,
                 const char *section,
+                unsigned section_line,
                 const char *lvalue,
                 int ltype,
                 const char *rvalue,
                 const char *lvalue,
                 int ltype,
                 const char *rvalue,
index 404df76e325a8f1261bcd71f124b9f29e7b8c5f1..99b8e03aa1e6301d2acb0c81dc140b2f7581a8d7 100644 (file)
@@ -29,59 +29,59 @@ int unit_load_fragment(Unit *u);
 
 void unit_dump_config_items(FILE *f);
 
 
 void unit_dump_config_items(FILE *f);
 
-int config_parse_warn_compat(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_unit_deps(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_unit_string_printf(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_unit_strv_printf(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_unit_path_printf(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_documentation(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_socket_listen(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_socket_bind(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_exec_nice(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_exec_oom_score_adjust(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_exec(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_service_timeout(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_service_type(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_service_restart(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_socket_bindtodevice(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_output(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_input(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_exec_io_class(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_exec_io_priority(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_exec_cpu_sched_policy(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_exec_cpu_sched_prio(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_exec_cpu_affinity(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_exec_capabilities(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_exec_secure_bits(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_bounding_set(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_limit(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_sysv_priority(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_kill_signal(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_exec_mount_flags(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_timer(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_trigger_unit(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_path_spec(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_socket_service(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_service_sockets(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_unit_env_file(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_ip_tos(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_unit_condition_path(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_unit_condition_string(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_unit_condition_null(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_kill_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_notify_access(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_start_limit_action(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_unit_requires_mounts_for(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_syscall_filter(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_environ(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_unit_slice(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_cpu_shares(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_memory_limit(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_device_policy(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_device_allow(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_blockio_weight(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_blockio_device_weight(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_blockio_bandwidth(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_warn_compat(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);
+int config_parse_unit_deps(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);
+int config_parse_unit_string_printf(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);
+int config_parse_unit_strv_printf(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);
+int config_parse_unit_path_printf(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);
+int config_parse_documentation(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);
+int config_parse_socket_listen(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);
+int config_parse_socket_bind(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);
+int config_parse_exec_nice(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);
+int config_parse_exec_oom_score_adjust(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);
+int config_parse_exec(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);
+int config_parse_service_timeout(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);
+int config_parse_service_type(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);
+int config_parse_service_restart(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);
+int config_parse_socket_bindtodevice(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);
+int config_parse_output(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);
+int config_parse_input(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);
+int config_parse_exec_io_class(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);
+int config_parse_exec_io_priority(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);
+int config_parse_exec_cpu_sched_policy(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);
+int config_parse_exec_cpu_sched_prio(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);
+int config_parse_exec_cpu_affinity(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);
+int config_parse_exec_capabilities(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);
+int config_parse_exec_secure_bits(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);
+int config_parse_bounding_set(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);
+int config_parse_limit(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);
+int config_parse_sysv_priority(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);
+int config_parse_kill_signal(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);
+int config_parse_exec_mount_flags(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);
+int config_parse_timer(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);
+int config_parse_trigger_unit(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);
+int config_parse_path_spec(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);
+int config_parse_socket_service(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);
+int config_parse_service_sockets(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);
+int config_parse_unit_env_file(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);
+int config_parse_ip_tos(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);
+int config_parse_unit_condition_path(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);
+int config_parse_unit_condition_string(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);
+int config_parse_unit_condition_null(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);
+int config_parse_kill_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);
+int config_parse_notify_access(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);
+int config_parse_start_limit_action(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);
+int config_parse_unit_requires_mounts_for(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);
+int config_parse_syscall_filter(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);
+int config_parse_environ(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);
+int config_parse_unit_slice(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);
+int config_parse_cpu_shares(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);
+int config_parse_memory_limit(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);
+int config_parse_device_policy(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);
+int config_parse_device_allow(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);
+int config_parse_blockio_weight(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);
+int config_parse_blockio_device_weight(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);
+int config_parse_blockio_bandwidth(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);
 
 /* gperf prototypes */
 const struct ConfigPerfItem* load_fragment_gperf_lookup(const char *key, unsigned length);
 
 /* gperf prototypes */
 const struct ConfigPerfItem* load_fragment_gperf_lookup(const char *key, unsigned length);
index 4d4f6e8f4caf664f772406840213b6f73326c8e8..bc92f65fd6c9d211029aa104ecb31ba05f383030 100644 (file)
@@ -435,6 +435,7 @@ static int parse_proc_cmdline_word(const char *word) {
                         const char *filename,                         \
                         unsigned line,                                \
                         const char *section,                          \
                         const char *filename,                         \
                         unsigned line,                                \
                         const char *section,                          \
+                        unsigned section_line,                        \
                         const char *lvalue,                           \
                         int ltype,                                    \
                         const char *rvalue,                           \
                         const char *lvalue,                           \
                         int ltype,                                    \
                         const char *rvalue,                           \
@@ -466,6 +467,7 @@ static int config_parse_cpu_affinity2(const char *unit,
                                       const char *filename,
                                       unsigned line,
                                       const char *section,
                                       const char *filename,
                                       unsigned line,
                                       const char *section,
+                                      unsigned section_line,
                                       const char *lvalue,
                                       int ltype,
                                       const char *rvalue,
                                       const char *lvalue,
                                       int ltype,
                                       const char *rvalue,
@@ -538,6 +540,7 @@ static int config_parse_join_controllers(const char *unit,
                                          const char *filename,
                                          unsigned line,
                                          const char *section,
                                          const char *filename,
                                          unsigned line,
                                          const char *section,
+                                         unsigned section_line,
                                          const char *lvalue,
                                          int ltype,
                                          const char *rvalue,
                                          const char *lvalue,
                                          int ltype,
                                          const char *rvalue,
index 069cd173c8d07a5256444c2caf703e217675113f..db577b89139e3685c5a1e948e449e47b731e1592 100644 (file)
@@ -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);
 
 /* 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_;
 
 
 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_;
 
 const char *split_mode_to_string(SplitMode s) _const_;
 SplitMode split_mode_from_string(const char *s) _pure_;
index 74f71441f9cc0c4196c62dfd6cbba8474e510c02..e9b424b5f64b949bb93bea032af863b8c76e02c7 100644 (file)
@@ -48,4 +48,4 @@ int manager_handle_action(
 const char* handle_action_to_string(HandleAction h) _const_;
 HandleAction handle_action_from_string(const char *s) _pure_;
 
 const char* handle_action_to_string(HandleAction h) _const_;
 HandleAction handle_action_from_string(const char *s) _pure_;
 
-int config_parse_handle_action(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_handle_action(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);
index 9fb24c95c19f2900c72222730973b4b04869c14d..0e582d626cebad8e2cbf6ab39e40bdc90d4ae1c6 100644 (file)
@@ -115,6 +115,7 @@ int config_parse_address(const char *unit,
                 const char *filename,
                 unsigned line,
                 const char *section,
                 const char *filename,
                 unsigned line,
                 const char *section,
+                unsigned section_line,
                 const char *lvalue,
                 int ltype,
                 const char *rvalue,
                 const char *lvalue,
                 int ltype,
                 const char *rvalue,
index 6ac5c524729d7f5e889d21ef70f7a9738a391473..3eca3cc547310583bbf9d8ffcd69352ca648d4d9 100644 (file)
@@ -100,6 +100,7 @@ int config_parse_gateway(const char *unit,
                 const char *filename,
                 unsigned line,
                 const char *section,
                 const char *filename,
                 unsigned line,
                 const char *section,
+                unsigned section_line,
                 const char *lvalue,
                 int ltype,
                 const char *rvalue,
                 const char *lvalue,
                 int ltype,
                 const char *rvalue,
index 498f2cdf09933b443a7d335fa9de27a68915d967..11012f5558dc87896814b090e163964b4538577c 100644 (file)
@@ -164,8 +164,8 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(Route*, route_free);
 #define _cleanup_route_free_ _cleanup_(route_freep)
 
 int config_parse_gateway(const char *unit, const char *filename, unsigned line,
 #define _cleanup_route_free_ _cleanup_(route_freep)
 
 int config_parse_gateway(const char *unit, const char *filename, unsigned line,
-                         const char *section, const char *lvalue, int ltype,
-                         const char *rvalue, void *data, void *userdata);
+                         const char *section, unsigned section_line, const char *lvalue,
+                         int ltype, const char *rvalue, void *data, void *userdata);
 
 /* Address */
 int address_new(Network *network, Address **ret);
 
 /* Address */
 int address_new(Network *network, Address **ret);
@@ -176,8 +176,8 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(Address*, address_free);
 #define _cleanup_address_free_ _cleanup_(address_freep)
 
 int config_parse_address(const char *unit, const char *filename, unsigned line,
 #define _cleanup_address_free_ _cleanup_(address_freep)
 
 int config_parse_address(const char *unit, const char *filename, unsigned line,
-                         const char *section, const char *lvalue, int ltype,
-                         const char *rvalue, void *data, void *userdata);
+                         const char *section, unsigned section_line, const char *lvalue,
+                         int ltype, const char *rvalue, void *data, void *userdata);
 
 /* Link */
 
 
 /* Link */
 
index 95d64fcca2541c159af0d02f36f01a8c721adf00..1e3cee5bebc4c21c97f161bda15e8201650fb4a4 100644 (file)
@@ -156,6 +156,7 @@ static int next_assignment(const char *unit,
                            ConfigItemLookup lookup,
                            void *table,
                            const char *section,
                            ConfigItemLookup lookup,
                            void *table,
                            const char *section,
+                           unsigned section_line,
                            const char *lvalue,
                            const char *rvalue,
                            bool relaxed,
                            const char *lvalue,
                            const char *rvalue,
                            bool relaxed,
@@ -178,8 +179,8 @@ static int next_assignment(const char *unit,
 
         if (r > 0) {
                 if (func)
 
         if (r > 0) {
                 if (func)
-                        return func(unit, filename, line, section, lvalue, ltype,
-                                    rvalue, data, userdata);
+                        return func(unit, filename, line, section, section_line,
+                                    lvalue, ltype, rvalue, data, userdata);
 
                 return 0;
         }
 
                 return 0;
         }
@@ -202,6 +203,7 @@ static int parse_line(const char* unit,
                       bool relaxed,
                       bool allow_include,
                       char **section,
                       bool relaxed,
                       bool allow_include,
                       char **section,
+                      unsigned *section_line,
                       char *l,
                       void *userdata) {
 
                       char *l,
                       void *userdata) {
 
@@ -262,9 +264,11 @@ static int parse_line(const char* unit,
                         free(n);
                         free(*section);
                         *section = NULL;
                         free(n);
                         free(*section);
                         *section = NULL;
+                        *section_line = 0;
                 } else {
                         free(*section);
                         *section = n;
                 } else {
                         free(*section);
                         *section = n;
+                        *section_line = line;
                 }
 
                 return 0;
                 }
 
                 return 0;
@@ -294,6 +298,7 @@ static int parse_line(const char* unit,
                                lookup,
                                table,
                                *section,
                                lookup,
                                table,
                                *section,
+                               *section_line,
                                strstrip(l),
                                strstrip(e),
                                relaxed,
                                strstrip(l),
                                strstrip(e),
                                relaxed,
@@ -313,7 +318,7 @@ int config_parse(const char *unit,
 
         _cleanup_free_ char *section = NULL, *continuation = NULL;
         _cleanup_fclose_ FILE *ours = NULL;
 
         _cleanup_free_ char *section = NULL, *continuation = NULL;
         _cleanup_fclose_ FILE *ours = NULL;
-        unsigned line = 0;
+        unsigned line = 0, section_line = 0;
         int r;
 
         assert(filename);
         int r;
 
         assert(filename);
@@ -382,6 +387,7 @@ int config_parse(const char *unit,
                                relaxed,
                                allow_include,
                                &section,
                                relaxed,
                                allow_include,
                                &section,
+                               &section_line,
                                p,
                                userdata);
                 free(c);
                                p,
                                userdata);
                 free(c);
@@ -398,6 +404,7 @@ int config_parse(const char *unit,
                                 const char *filename,                   \
                                 unsigned line,                          \
                                 const char *section,                    \
                                 const char *filename,                   \
                                 unsigned line,                          \
                                 const char *section,                    \
+                                unsigned section_line,                  \
                                 const char *lvalue,                     \
                                 int ltype,                              \
                                 const char *rvalue,                     \
                                 const char *lvalue,                     \
                                 int ltype,                              \
                                 const char *rvalue,                     \
@@ -434,6 +441,7 @@ int config_parse_bytes_size(const char* unit,
                             const char *filename,
                             unsigned line,
                             const char *section,
                             const char *filename,
                             unsigned line,
                             const char *section,
+                            unsigned section_line,
                             const char *lvalue,
                             int ltype,
                             const char *rvalue,
                             const char *lvalue,
                             int ltype,
                             const char *rvalue,
@@ -465,6 +473,7 @@ int config_parse_bytes_off(const char* unit,
                            const char *filename,
                            unsigned line,
                            const char *section,
                            const char *filename,
                            unsigned line,
                            const char *section,
+                           unsigned section_line,
                            const char *lvalue,
                            int ltype,
                            const char *rvalue,
                            const char *lvalue,
                            int ltype,
                            const char *rvalue,
@@ -493,6 +502,7 @@ int config_parse_bool(const char* unit,
                       const char *filename,
                       unsigned line,
                       const char *section,
                       const char *filename,
                       unsigned line,
                       const char *section,
+                      unsigned section_line,
                       const char *lvalue,
                       int ltype,
                       const char *rvalue,
                       const char *lvalue,
                       int ltype,
                       const char *rvalue,
@@ -522,6 +532,7 @@ int config_parse_string(const char *unit,
                         const char *filename,
                         unsigned line,
                         const char *section,
                         const char *filename,
                         unsigned line,
                         const char *section,
+                        unsigned section_line,
                         const char *lvalue,
                         int ltype,
                         const char *rvalue,
                         const char *lvalue,
                         int ltype,
                         const char *rvalue,
@@ -562,6 +573,7 @@ int config_parse_path(const char *unit,
                       const char *filename,
                       unsigned line,
                       const char *section,
                       const char *filename,
                       unsigned line,
                       const char *section,
+                      unsigned section_line,
                       const char *lvalue,
                       int ltype,
                       const char *rvalue,
                       const char *lvalue,
                       int ltype,
                       const char *rvalue,
@@ -607,6 +619,7 @@ int config_parse_strv(const char *unit,
                       const char *filename,
                       unsigned line,
                       const char *section,
                       const char *filename,
                       unsigned line,
                       const char *section,
+                      unsigned section_line,
                       const char *lvalue,
                       int ltype,
                       const char *rvalue,
                       const char *lvalue,
                       int ltype,
                       const char *rvalue,
@@ -663,6 +676,7 @@ int config_parse_path_strv(const char *unit,
                            const char *filename,
                            unsigned line,
                            const char *section,
                            const char *filename,
                            unsigned line,
                            const char *section,
+                           unsigned section_line,
                            const char *lvalue,
                            int ltype,
                            const char *rvalue,
                            const char *lvalue,
                            int ltype,
                            const char *rvalue,
@@ -720,6 +734,7 @@ int config_parse_mode(const char *unit,
                       const char *filename,
                       unsigned line,
                       const char *section,
                       const char *filename,
                       unsigned line,
                       const char *section,
+                      unsigned section_line,
                       const char *lvalue,
                       int ltype,
                       const char *rvalue,
                       const char *lvalue,
                       int ltype,
                       const char *rvalue,
@@ -757,6 +772,7 @@ int config_parse_facility(const char *unit,
                           const char *filename,
                           unsigned line,
                           const char *section,
                           const char *filename,
                           unsigned line,
                           const char *section,
+                          unsigned section_line,
                           const char *lvalue,
                           int ltype,
                           const char *rvalue,
                           const char *lvalue,
                           int ltype,
                           const char *rvalue,
@@ -787,6 +803,7 @@ int config_parse_level(const char *unit,
                        const char *filename,
                        unsigned line,
                        const char *section,
                        const char *filename,
                        unsigned line,
                        const char *section,
+                       unsigned section_line,
                        const char *lvalue,
                        int ltype,
                        const char *rvalue,
                        const char *lvalue,
                        int ltype,
                        const char *rvalue,
@@ -816,6 +833,7 @@ int config_parse_set_status(const char *unit,
                             const char *filename,
                             unsigned line,
                             const char *section,
                             const char *filename,
                             unsigned line,
                             const char *section,
+                            unsigned section_line,
                             const char *lvalue,
                             int ltype,
                             const char *rvalue,
                             const char *lvalue,
                             int ltype,
                             const char *rvalue,
index 312315b35eab3ad13a3c248854f1ec6f7ac1a404..42602b3b085bae7c8b2a822409ef48a80e48bf5a 100644 (file)
@@ -34,6 +34,7 @@ typedef int (*ConfigParserCallback)(const char *unit,
                                     const char *filename,
                                     unsigned line,
                                     const char *section,
                                     const char *filename,
                                     unsigned line,
                                     const char *section,
+                                    unsigned section_line,
                                     const char *lvalue,
                                     int ltype,
                                     const char *rvalue,
                                     const char *lvalue,
                                     int ltype,
                                     const char *rvalue,
@@ -91,24 +92,24 @@ int config_parse(const char *unit,
                  void *userdata);
 
 /* Generic parsers */
                  void *userdata);
 
 /* Generic parsers */
-int config_parse_int(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_unsigned(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_long(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_uint64(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_double(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_bytes_size(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_bytes_off(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_bool(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_string(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_path(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_strv(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_path_strv(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_sec(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_nsec(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_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_facility(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_level(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_set_status(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_int(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);
+int config_parse_unsigned(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);
+int config_parse_long(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);
+int config_parse_uint64(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);
+int config_parse_double(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);
+int config_parse_bytes_size(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);
+int config_parse_bytes_off(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);
+int config_parse_bool(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);
+int config_parse_string(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);
+int config_parse_path(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);
+int config_parse_strv(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);
+int config_parse_path_strv(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);
+int config_parse_sec(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);
+int config_parse_nsec(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);
+int config_parse_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);
+int config_parse_facility(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);
+int config_parse_level(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);
+int config_parse_set_status(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);
 
 int log_syntax_internal(const char *unit, int level,
                         const char *file, unsigned line, const char *func,
 
 int log_syntax_internal(const char *unit, int level,
                         const char *file, unsigned line, const char *func,
@@ -126,6 +127,7 @@ int log_syntax_internal(const char *unit, int level,
                      const char *filename,                              \
                      unsigned line,                                     \
                      const char *section,                               \
                      const char *filename,                              \
                      unsigned line,                                     \
                      const char *section,                               \
+                     unsigned section_line,                             \
                      const char *lvalue,                                \
                      int ltype,                                         \
                      const char *rvalue,                                \
                      const char *lvalue,                                \
                      int ltype,                                         \
                      const char *rvalue,                                \
@@ -154,6 +156,7 @@ int log_syntax_internal(const char *unit, int level,
                      const char *filename,                                     \
                      unsigned line,                                            \
                      const char *section,                                      \
                      const char *filename,                                     \
                      unsigned line,                                            \
                      const char *section,                                      \
+                     unsigned section_line,                                    \
                      const char *lvalue,                                       \
                      int ltype,                                                \
                      const char *rvalue,                                       \
                      const char *lvalue,                                       \
                      int ltype,                                                \
                      const char *rvalue,                                       \
index 16504eef0fe7aee6c4306de9a8dbc7e5c7c80ef8..100ed69744ad4f8383b13bb666743f843b838854 100644 (file)
@@ -922,6 +922,7 @@ static int config_parse_also(const char *unit,
                              const char *filename,
                              unsigned line,
                              const char *section,
                              const char *filename,
                              unsigned line,
                              const char *section,
+                             unsigned section_line,
                              const char *lvalue,
                              int ltype,
                              const char *rvalue,
                              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,
                              const char *filename,
                              unsigned line,
                              const char *section,
+                             unsigned section_line,
                              const char *lvalue,
                              int ltype,
                              const char *rvalue,
                              const char *lvalue,
                              int ltype,
                              const char *rvalue,
index f2fd0819d375dc5170058b6859251d541dbd1f0f..fa89bd904fea589d52dfd63d0544fea37bd20f18 100644 (file)
@@ -87,6 +87,7 @@ int config_parse_ifname(const char *unit,
                         const char *filename,
                         unsigned line,
                         const char *section,
                         const char *filename,
                         unsigned line,
                         const char *section,
+                        unsigned section_line,
                         const char *lvalue,
                         int ltype,
                         const char *rvalue,
                         const char *lvalue,
                         int ltype,
                         const char *rvalue,
@@ -127,6 +128,7 @@ int config_parse_ifalias(const char *unit,
                          const char *filename,
                          unsigned line,
                          const char *section,
                          const char *filename,
                          unsigned line,
                          const char *section,
+                         unsigned section_line,
                          const char *lvalue,
                          int ltype,
                          const char *rvalue,
                          const char *lvalue,
                          int ltype,
                          const char *rvalue,
@@ -167,6 +169,7 @@ int config_parse_hwaddr(const char *unit,
                         const char *filename,
                         unsigned line,
                         const char *section,
                         const char *filename,
                         unsigned line,
                         const char *section,
+                        unsigned section_line,
                         const char *lvalue,
                         int ltype,
                         const char *rvalue,
                         const char *lvalue,
                         int ltype,
                         const char *rvalue,
index d6ca737e7fb4e92970940d5a804b452dfc0a1a3c..c7edfb96f03ab54074d25a118c85e62975a4d6b4 100644 (file)
@@ -36,15 +36,15 @@ bool net_match_config(const struct ether_addr *match_mac,
                       const char *dev_name);
 
 int config_parse_hwaddr(const char *unit, const char *filename, unsigned line,
                       const char *dev_name);
 
 int config_parse_hwaddr(const char *unit, const char *filename, unsigned line,
-                        const char *section, const char *lvalue, int ltype,
-                        const char *rvalue, void *data, void *userdata);
+                        const char *section, unsigned section_line, const char *lvalue,
+                        int ltype, const char *rvalue, void *data, void *userdata);
 
 int config_parse_ifname(const char *unit, const char *filename, unsigned line,
 
 int config_parse_ifname(const char *unit, const char *filename, unsigned line,
-                        const char *section, const char *lvalue, int ltype,
-                        const char *rvalue, void *data, void *userdata);
+                        const char *section, unsigned section_line, const char *lvalue,
+                        int ltype, const char *rvalue, void *data, void *userdata);
 
 int config_parse_ifalias(const char *unit, const char *filename, unsigned line,
 
 int config_parse_ifalias(const char *unit, const char *filename, unsigned line,
-                         const char *section, const char *lvalue, int ltype,
-                         const char *rvalue, void *data, void *userdata);
+                         const char *section, unsigned section_line, const char *lvalue,
+                         int ltype, const char *rvalue, void *data, void *userdata);
 
 int net_parse_inaddr(const char *address, unsigned char *family, void *dst);
 
 int net_parse_inaddr(const char *address, unsigned char *family, void *dst);
index 0413ae211746cee293a18709e37ebd0b28265e1f..1b4133b5d34004ba999d02b6cffc027541f52bd2 100644 (file)
@@ -80,6 +80,7 @@ static void test_config_parse_exec(void) {
         /*         const char *filename, */
         /*         unsigned line, */
         /*         const char *section, */
         /*         const char *filename, */
         /*         unsigned line, */
         /*         const char *section, */
+        /*         unsigned section_line, */
         /*         const char *lvalue, */
         /*         int ltype, */
         /*         const char *rvalue, */
         /*         const char *lvalue, */
         /*         int ltype, */
         /*         const char *rvalue, */
@@ -90,13 +91,13 @@ static void test_config_parse_exec(void) {
         ExecCommand *c = NULL, *c1;
 
         /* basic test */
         ExecCommand *c = NULL, *c1;
 
         /* basic test */
-        r = config_parse_exec(NULL, "fake", 1, "section",
+        r = config_parse_exec(NULL, "fake", 1, "section", 1,
                               "LValue", 0, "/RValue r1",
                               &c, NULL);
         assert_se(r >= 0);
         check_execcommand(c, "/RValue", "/RValue", "r1", false);
 
                               "LValue", 0, "/RValue r1",
                               &c, NULL);
         assert_se(r >= 0);
         check_execcommand(c, "/RValue", "/RValue", "r1", false);
 
-        r = config_parse_exec(NULL, "fake", 2, "section",
+        r = config_parse_exec(NULL, "fake", 2, "section", 1,
                               "LValue", 0, "/RValue///slashes/// r1",
                               &c, NULL);
        /* test slashes */
                               "LValue", 0, "/RValue///slashes/// r1",
                               &c, NULL);
        /* test slashes */
@@ -106,7 +107,7 @@ static void test_config_parse_exec(void) {
                           "r1", false);
 
         /* honour_argv0 */
                           "r1", false);
 
         /* honour_argv0 */
-        r = config_parse_exec(NULL, "fake", 3, "section",
+        r = config_parse_exec(NULL, "fake", 3, "section", 1,
                               "LValue", 0, "@/RValue///slashes2/// argv0 r1",
                               &c, NULL);
         assert_se(r >= 0);
                               "LValue", 0, "@/RValue///slashes2/// argv0 r1",
                               &c, NULL);
         assert_se(r >= 0);
@@ -114,7 +115,7 @@ static void test_config_parse_exec(void) {
         check_execcommand(c1, "/RValue/slashes2", "argv0", "r1", false);
 
         /* ignore && honour_argv0 */
         check_execcommand(c1, "/RValue/slashes2", "argv0", "r1", false);
 
         /* ignore && honour_argv0 */
-        r = config_parse_exec(NULL, "fake", 4, "section",
+        r = config_parse_exec(NULL, "fake", 4, "section", 1,
                               "LValue", 0, "-@/RValue///slashes3/// argv0a r1",
                               &c, NULL);
         assert_se(r >= 0);
                               "LValue", 0, "-@/RValue///slashes3/// argv0a r1",
                               &c, NULL);
         assert_se(r >= 0);
@@ -123,7 +124,7 @@ static void test_config_parse_exec(void) {
                           "/RValue/slashes3", "argv0a", "r1", true);
 
         /* ignore && honour_argv0 */
                           "/RValue/slashes3", "argv0a", "r1", true);
 
         /* ignore && honour_argv0 */
-        r = config_parse_exec(NULL, "fake", 4, "section",
+        r = config_parse_exec(NULL, "fake", 4, "section", 1,
                               "LValue", 0, "@-/RValue///slashes4/// argv0b r1",
                               &c, NULL);
         assert_se(r >= 0);
                               "LValue", 0, "@-/RValue///slashes4/// argv0b r1",
                               &c, NULL);
         assert_se(r >= 0);
@@ -132,21 +133,21 @@ static void test_config_parse_exec(void) {
                           "/RValue/slashes4", "argv0b", "r1", true);
 
         /* ignore && ignore */
                           "/RValue/slashes4", "argv0b", "r1", true);
 
         /* ignore && ignore */
-        r = config_parse_exec(NULL, "fake", 4, "section",
+        r = config_parse_exec(NULL, "fake", 4, "section", 1,
                               "LValue", 0, "--/RValue argv0 r1",
                               &c, NULL);
         assert_se(r == 0);
         assert_se(c1->command_next == NULL);
 
         /* ignore && ignore */
                               "LValue", 0, "--/RValue argv0 r1",
                               &c, NULL);
         assert_se(r == 0);
         assert_se(c1->command_next == NULL);
 
         /* ignore && ignore */
-        r = config_parse_exec(NULL, "fake", 4, "section",
+        r = config_parse_exec(NULL, "fake", 4, "section", 1,
                               "LValue", 0, "-@-/RValue argv0 r1",
                               &c, NULL);
         assert_se(r == 0);
         assert_se(c1->command_next == NULL);
 
         /* semicolon */
                               "LValue", 0, "-@-/RValue argv0 r1",
                               &c, NULL);
         assert_se(r == 0);
         assert_se(c1->command_next == NULL);
 
         /* semicolon */
-        r = config_parse_exec(NULL, "fake", 5, "section",
+        r = config_parse_exec(NULL, "fake", 5, "section", 1,
                               "LValue", 0,
                               "-@/RValue argv0 r1 ; "
                               "/goo/goo boo",
                               "LValue", 0,
                               "-@/RValue argv0 r1 ; "
                               "/goo/goo boo",
@@ -161,7 +162,7 @@ static void test_config_parse_exec(void) {
                           "/goo/goo", "/goo/goo", "boo", false);
 
         /* trailing semicolon */
                           "/goo/goo", "/goo/goo", "boo", false);
 
         /* trailing semicolon */
-        r = config_parse_exec(NULL, "fake", 5, "section",
+        r = config_parse_exec(NULL, "fake", 5, "section", 1,
                               "LValue", 0,
                               "-@/RValue argv0 r1 ; ",
                               &c, NULL);
                               "LValue", 0,
                               "-@/RValue argv0 r1 ; ",
                               &c, NULL);
@@ -173,7 +174,7 @@ static void test_config_parse_exec(void) {
         assert_se(c1->command_next == NULL);
 
         /* escaped semicolon */
         assert_se(c1->command_next == NULL);
 
         /* escaped semicolon */
-        r = config_parse_exec(NULL, "fake", 5, "section",
+        r = config_parse_exec(NULL, "fake", 5, "section", 1,
                               "LValue", 0,
                               "/usr/bin/find \\;",
                               &c, NULL);
                               "LValue", 0,
                               "/usr/bin/find \\;",
                               &c, NULL);
index a02088fd9e3ecbab39170d04bbc5c376df3cb29c..c8638f22ec7a7199492c57b1c76b1229822f440e 100644 (file)
@@ -51,5 +51,5 @@ Duplex duplex_from_string(const char *d) _pure_;
 const char *wol_to_string(WakeOnLan wol) _const_;
 WakeOnLan wol_from_string(const char *wol) _pure_;
 
 const char *wol_to_string(WakeOnLan wol) _const_;
 WakeOnLan wol_from_string(const char *wol) _pure_;
 
-int config_parse_duplex(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_wol(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_duplex(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);
+int config_parse_wol(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);
index f74a790d558958295e5bd6df56d0da6f68338066..a55c6f5f05d66ab37d73acf60ef47ab664f57cec 100644 (file)
@@ -86,5 +86,5 @@ MACPolicy mac_policy_from_string(const char *p) _pure_;
 /* gperf lookup function */
 const struct ConfigPerfItem* link_config_gperf_lookup(const char *key, unsigned length);
 
 /* gperf lookup function */
 const struct ConfigPerfItem* link_config_gperf_lookup(const char *key, unsigned length);
 
-int config_parse_mac_policy(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_name_policy(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_mac_policy(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);
+int config_parse_name_policy(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);