]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: rebreak conf parser arguments
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 16 Aug 2021 03:41:34 +0000 (12:41 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 16 Aug 2021 03:54:09 +0000 (12:54 +0900)
src/network/netdev/geneve.c
src/network/netdev/tunnel.c
src/network/netdev/vxlan.c
src/network/networkd-dhcp-common.c
src/network/networkd-dhcp4.c
src/network/networkd-network.c

index b0baa53edcd6688d59c9d6c5f73a5fd2606679a1..1bffbc958654325d5231088008aa092c799668ab 100644 (file)
@@ -164,16 +164,18 @@ static int netdev_geneve_create(NetDev *netdev) {
         return r;
 }
 
-int config_parse_geneve_vni(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_geneve_vni(
+                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) {
+
         Geneve *v = userdata;
         uint32_t f;
         int r;
@@ -199,16 +201,18 @@ int config_parse_geneve_vni(const char *unit,
         return 0;
 }
 
-int config_parse_geneve_address(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_geneve_address(
+                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) {
+
         Geneve *v = userdata;
         union in_addr_union *addr = data, buffer;
         int r, f;
@@ -236,16 +240,18 @@ int config_parse_geneve_address(const char *unit,
         return 0;
 }
 
-int config_parse_geneve_flow_label(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_geneve_flow_label(
+                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) {
+
         Geneve *v = userdata;
         uint32_t f;
         int r;
@@ -272,16 +278,18 @@ int config_parse_geneve_flow_label(const char *unit,
         return 0;
 }
 
-int config_parse_geneve_ttl(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_geneve_ttl(
+                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) {
+
         Geneve *v = userdata;
         unsigned f;
         int r;
index f27a1e4335144dfd6bce185daa66fbff1868d461..cae2ef1a909b381d07c65bf8c289de0ebc656891 100644 (file)
@@ -501,16 +501,18 @@ static int netdev_tunnel_verify(NetDev *netdev, const char *filename) {
         return 0;
 }
 
-int config_parse_tunnel_address(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_tunnel_address(
+                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) {
+
         Tunnel *t = userdata;
         union in_addr_union *addr = data, buffer;
         int r, f;
@@ -555,16 +557,18 @@ int config_parse_tunnel_address(const char *unit,
         return 0;
 }
 
-int config_parse_tunnel_key(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_tunnel_key(
+                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) {
+
         union in_addr_union buffer;
         Tunnel *t = userdata;
         uint32_t k;
@@ -596,16 +600,18 @@ int config_parse_tunnel_key(const char *unit,
         return 0;
 }
 
-int config_parse_ipv6_flowlabel(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_ipv6_flowlabel(
+                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) {
+
         IPv6FlowLabel *ipv6_flowlabel = data;
         Tunnel *t = userdata;
         int k = 0;
@@ -635,16 +641,18 @@ int config_parse_ipv6_flowlabel(const char* unit,
         return 0;
 }
 
-int config_parse_encap_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_encap_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) {
+
         Tunnel *t = userdata;
         int k = 0;
         int r;
@@ -673,26 +681,27 @@ int config_parse_encap_limit(const char* unit,
         return 0;
 }
 
-int config_parse_6rd_prefix(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_6rd_prefix(
+                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) {
+
         Tunnel *t = userdata;
+        union in_addr_union p;
+        uint8_t l;
+        int r;
 
         assert(filename);
         assert(lvalue);
         assert(rvalue);
 
-        union in_addr_union p;
-        uint8_t l;
-        int r;
-
         r = in_addr_prefix_from_string(rvalue, AF_INET6, &p, &l);
         if (r < 0) {
                 log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse 6rd prefix \"%s\", ignoring: %m", rvalue);
index 52d8b3736ccd43afdcc3e06df6d2fa456e5aff0e..6829017f808e37e875eefcc0c8415ec4e2c264f1 100644 (file)
@@ -174,16 +174,18 @@ static int netdev_vxlan_fill_message_create(NetDev *netdev, Link *link, sd_netli
         return r;
 }
 
-int config_parse_vxlan_address(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_vxlan_address(
+                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) {
+
         VxLan *v = userdata;
         union in_addr_union *addr = data, buffer;
         int r, f;
@@ -225,16 +227,18 @@ int config_parse_vxlan_address(const char *unit,
         return 0;
 }
 
-int config_parse_port_range(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_port_range(
+                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) {
+
         VxLan *v = userdata;
         uint16_t low, high;
         int r;
@@ -257,16 +261,18 @@ int config_parse_port_range(const char *unit,
         return 0;
 }
 
-int config_parse_flow_label(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_flow_label(
+                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) {
+
         VxLan *v = userdata;
         unsigned f;
         int r;
@@ -293,16 +299,18 @@ int config_parse_flow_label(const char *unit,
         return 0;
 }
 
-int config_parse_vxlan_ttl(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_vxlan_ttl(
+                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) {
+
         VxLan *v = userdata;
         unsigned f;
         int r;
index 2b201e271eeb70dd8863dfe53dccfb54a3193fc4..19c888287c5ecdf0bdfe0dc5ad784a5a059d8b8c 100644 (file)
@@ -460,16 +460,17 @@ int config_parse_section_route_table(
         return 0;
 }
 
-int config_parse_iaid(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_iaid(
+                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) {
 
         Network *network = userdata;
         uint32_t iaid;
index 12fb85bf9020f2640cb06ad4c53302f39f47d06e..0d0097f0d03dcdb601ddc54f2414a150b9a01e19 100644 (file)
@@ -1838,7 +1838,8 @@ int config_parse_dhcp_ip_service_type(
         return 0;
 }
 
-int config_parse_dhcp_fallback_lease_lifetime(const char *unit,
+int config_parse_dhcp_fallback_lease_lifetime(
+                const char *unit,
                 const char *filename,
                 unsigned line,
                 const char *section,
@@ -1848,6 +1849,7 @@ int config_parse_dhcp_fallback_lease_lifetime(const char *unit,
                 const char *rvalue,
                 void *data,
                 void *userdata) {
+
         Network *network = userdata;
         uint32_t k;
 
index f16553a6d9d72d692231d7b62fb3d6c167f09871..0f4b00992fb09e18d984cd402a58c1ac681937b9 100644 (file)
@@ -719,7 +719,8 @@ bool network_has_static_ipv6_configurations(Network *network) {
         return false;
 }
 
-int config_parse_stacked_netdev(const char *unit,
+int config_parse_stacked_netdev(
+                const char *unit,
                 const char *filename,
                 unsigned line,
                 const char *section,
@@ -729,6 +730,7 @@ int config_parse_stacked_netdev(const char *unit,
                 const char *rvalue,
                 void *data,
                 void *userdata) {
+
         _cleanup_free_ char *name = NULL;
         NetDevKind kind = ltype;
         Hashmap **h = data;