Forráskód Böngészése

ncd: make NCDModuleGroup structs non-const (for next commit which will need to modify them)

ambrop7 13 éve
szülő
commit
8ed78cb35d
69 módosított fájl, 138 hozzáadás és 138 törlés
  1. 1 1
      ncd/modules/alias.c
  2. 1 1
      ncd/modules/arithmetic.c
  3. 1 1
      ncd/modules/assert.c
  4. 1 1
      ncd/modules/blocker.c
  5. 1 1
      ncd/modules/call.c
  6. 1 1
      ncd/modules/call2.c
  7. 1 1
      ncd/modules/choose.c
  8. 1 1
      ncd/modules/concat.c
  9. 1 1
      ncd/modules/concatv.c
  10. 1 1
      ncd/modules/daemon.c
  11. 1 1
      ncd/modules/depend.c
  12. 1 1
      ncd/modules/dynamic_depend.c
  13. 1 1
      ncd/modules/exit.c
  14. 1 1
      ncd/modules/explode.c
  15. 1 1
      ncd/modules/file.c
  16. 1 1
      ncd/modules/foreach.c
  17. 1 1
      ncd/modules/from_string.c
  18. 1 1
      ncd/modules/getargs.c
  19. 1 1
      ncd/modules/if.c
  20. 1 1
      ncd/modules/imperative.c
  21. 1 1
      ncd/modules/implode.c
  22. 1 1
      ncd/modules/index.c
  23. 1 1
      ncd/modules/list.c
  24. 1 1
      ncd/modules/logical.c
  25. 68 68
      ncd/modules/modules.h
  26. 1 1
      ncd/modules/multidepend.c
  27. 1 1
      ncd/modules/net_backend_badvpn.c
  28. 1 1
      ncd/modules/net_backend_rfkill.c
  29. 1 1
      ncd/modules/net_backend_waitdevice.c
  30. 1 1
      ncd/modules/net_backend_waitlink.c
  31. 1 1
      ncd/modules/net_backend_wpa_supplicant.c
  32. 1 1
      ncd/modules/net_dns.c
  33. 1 1
      ncd/modules/net_iptables.c
  34. 1 1
      ncd/modules/net_ipv4_addr.c
  35. 1 1
      ncd/modules/net_ipv4_addr_in_network.c
  36. 1 1
      ncd/modules/net_ipv4_arp_probe.c
  37. 1 1
      ncd/modules/net_ipv4_dhcp.c
  38. 1 1
      ncd/modules/net_ipv4_route.c
  39. 1 1
      ncd/modules/net_ipv6_addr.c
  40. 1 1
      ncd/modules/net_ipv6_addr_in_network.c
  41. 1 1
      ncd/modules/net_ipv6_route.c
  42. 1 1
      ncd/modules/net_ipv6_wait_dynamic_addr.c
  43. 1 1
      ncd/modules/net_up.c
  44. 1 1
      ncd/modules/net_watch_interfaces.c
  45. 1 1
      ncd/modules/netmask.c
  46. 1 1
      ncd/modules/ondemand.c
  47. 1 1
      ncd/modules/parse.c
  48. 1 1
      ncd/modules/print.c
  49. 1 1
      ncd/modules/process_manager.c
  50. 1 1
      ncd/modules/reboot.c
  51. 1 1
      ncd/modules/ref.c
  52. 1 1
      ncd/modules/regex_match.c
  53. 1 1
      ncd/modules/run.c
  54. 1 1
      ncd/modules/runonce.c
  55. 1 1
      ncd/modules/sleep.c
  56. 1 1
      ncd/modules/spawn.c
  57. 1 1
      ncd/modules/strcmp.c
  58. 1 1
      ncd/modules/sys_evdev.c
  59. 1 1
      ncd/modules/sys_request_client.c
  60. 1 1
      ncd/modules/sys_request_server.c
  61. 1 1
      ncd/modules/sys_watch_directory.c
  62. 1 1
      ncd/modules/sys_watch_input.c
  63. 1 1
      ncd/modules/sys_watch_usb.c
  64. 1 1
      ncd/modules/to_string.c
  65. 1 1
      ncd/modules/try.c
  66. 1 1
      ncd/modules/value.c
  67. 1 1
      ncd/modules/valuemetic.c
  68. 1 1
      ncd/modules/var.c
  69. 3 3
      ncd/ncd.c

+ 1 - 1
ncd/modules/alias.c

@@ -214,6 +214,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_alias = {
+struct NCDModuleGroup ncdmodule_alias = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/arithmetic.c

@@ -340,6 +340,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_arithmetic = {
+struct NCDModuleGroup ncdmodule_arithmetic = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/assert.c

@@ -98,6 +98,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_assert = {
+struct NCDModuleGroup ncdmodule_assert = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/blocker.c

@@ -352,6 +352,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_blocker = {
+struct NCDModuleGroup ncdmodule_blocker = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/call.c

@@ -350,7 +350,7 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_call = {
+struct NCDModuleGroup ncdmodule_call = {
     .modules = modules,
     .strings = strings
 };

+ 1 - 1
ncd/modules/call2.c

@@ -480,7 +480,7 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_call2 = {
+struct NCDModuleGroup ncdmodule_call2 = {
     .modules = modules,
     .strings = strings
 };

+ 1 - 1
ncd/modules/choose.c

@@ -142,6 +142,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_choose = {
+struct NCDModuleGroup ncdmodule_choose = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/concat.c

@@ -130,6 +130,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_concat = {
+struct NCDModuleGroup ncdmodule_concat = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/concatv.c

@@ -141,6 +141,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_concatv = {
+struct NCDModuleGroup ncdmodule_concatv = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/daemon.c

@@ -267,6 +267,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_daemon = {
+struct NCDModuleGroup ncdmodule_daemon = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/depend.c

@@ -413,7 +413,7 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_depend = {
+struct NCDModuleGroup ncdmodule_depend = {
     .func_globalinit = func_globalinit,
     .modules = modules
 };

+ 1 - 1
ncd/modules/dynamic_depend.c

@@ -494,7 +494,7 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_dynamic_depend = {
+struct NCDModuleGroup ncdmodule_dynamic_depend = {
     .func_globalinit = func_globalinit,
     .modules = modules
 };

+ 1 - 1
ncd/modules/exit.c

@@ -87,6 +87,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_exit = {
+struct NCDModuleGroup ncdmodule_exit = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/explode.c

@@ -227,6 +227,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_explode = {
+struct NCDModuleGroup ncdmodule_explode = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/file.c

@@ -330,6 +330,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_file = {
+struct NCDModuleGroup ncdmodule_file = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/foreach.c

@@ -715,7 +715,7 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_foreach = {
+struct NCDModuleGroup ncdmodule_foreach = {
     .modules = modules,
     .strings = strings
 };

+ 1 - 1
ncd/modules/from_string.c

@@ -124,6 +124,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_from_string = {
+struct NCDModuleGroup ncdmodule_from_string = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/getargs.c

@@ -87,6 +87,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_getargs = {
+struct NCDModuleGroup ncdmodule_getargs = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/if.c

@@ -98,6 +98,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_if = {
+struct NCDModuleGroup ncdmodule_if = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/imperative.c

@@ -318,7 +318,7 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_imperative = {
+struct NCDModuleGroup ncdmodule_imperative = {
     .modules = modules,
     .strings = strings
 };

+ 1 - 1
ncd/modules/implode.c

@@ -153,6 +153,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_implode = {
+struct NCDModuleGroup ncdmodule_implode = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/index.c

@@ -168,6 +168,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_index = {
+struct NCDModuleGroup ncdmodule_index = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/list.c

@@ -909,6 +909,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_list = {
+struct NCDModuleGroup ncdmodule_list = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/logical.c

@@ -159,6 +159,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_logical = {
+struct NCDModuleGroup ncdmodule_logical = {
     .modules = modules
 };

+ 68 - 68
ncd/modules/modules.h

@@ -34,81 +34,81 @@
 
 #include <ncd/NCDModule.h>
 
-extern const struct NCDModuleGroup ncdmodule_var;
-extern const struct NCDModuleGroup ncdmodule_list;
-extern const struct NCDModuleGroup ncdmodule_depend;
-extern const struct NCDModuleGroup ncdmodule_multidepend;
-extern const struct NCDModuleGroup ncdmodule_dynamic_depend;
-extern const struct NCDModuleGroup ncdmodule_concat;
-extern const struct NCDModuleGroup ncdmodule_concatv;
-extern const struct NCDModuleGroup ncdmodule_if;
-extern const struct NCDModuleGroup ncdmodule_strcmp;
-extern const struct NCDModuleGroup ncdmodule_regex_match;
-extern const struct NCDModuleGroup ncdmodule_logical;
-extern const struct NCDModuleGroup ncdmodule_sleep;
-extern const struct NCDModuleGroup ncdmodule_print;
-extern const struct NCDModuleGroup ncdmodule_blocker;
-extern const struct NCDModuleGroup ncdmodule_run;
-extern const struct NCDModuleGroup ncdmodule_runonce;
-extern const struct NCDModuleGroup ncdmodule_daemon;
-extern const struct NCDModuleGroup ncdmodule_spawn;
-extern const struct NCDModuleGroup ncdmodule_call;
-extern const struct NCDModuleGroup ncdmodule_imperative;
-extern const struct NCDModuleGroup ncdmodule_ref;
-extern const struct NCDModuleGroup ncdmodule_index;
-extern const struct NCDModuleGroup ncdmodule_alias;
-extern const struct NCDModuleGroup ncdmodule_process_manager;
-extern const struct NCDModuleGroup ncdmodule_ondemand;
-extern const struct NCDModuleGroup ncdmodule_foreach;
-extern const struct NCDModuleGroup ncdmodule_choose;
-extern const struct NCDModuleGroup ncdmodule_from_string;
-extern const struct NCDModuleGroup ncdmodule_to_string;
-extern const struct NCDModuleGroup ncdmodule_value;
-extern const struct NCDModuleGroup ncdmodule_try;
-extern const struct NCDModuleGroup ncdmodule_net_backend_waitdevice;
-extern const struct NCDModuleGroup ncdmodule_net_backend_waitlink;
-extern const struct NCDModuleGroup ncdmodule_net_backend_badvpn;
-extern const struct NCDModuleGroup ncdmodule_net_backend_wpa_supplicant;
+extern struct NCDModuleGroup ncdmodule_var;
+extern struct NCDModuleGroup ncdmodule_list;
+extern struct NCDModuleGroup ncdmodule_depend;
+extern struct NCDModuleGroup ncdmodule_multidepend;
+extern struct NCDModuleGroup ncdmodule_dynamic_depend;
+extern struct NCDModuleGroup ncdmodule_concat;
+extern struct NCDModuleGroup ncdmodule_concatv;
+extern struct NCDModuleGroup ncdmodule_if;
+extern struct NCDModuleGroup ncdmodule_strcmp;
+extern struct NCDModuleGroup ncdmodule_regex_match;
+extern struct NCDModuleGroup ncdmodule_logical;
+extern struct NCDModuleGroup ncdmodule_sleep;
+extern struct NCDModuleGroup ncdmodule_print;
+extern struct NCDModuleGroup ncdmodule_blocker;
+extern struct NCDModuleGroup ncdmodule_run;
+extern struct NCDModuleGroup ncdmodule_runonce;
+extern struct NCDModuleGroup ncdmodule_daemon;
+extern struct NCDModuleGroup ncdmodule_spawn;
+extern struct NCDModuleGroup ncdmodule_call;
+extern struct NCDModuleGroup ncdmodule_imperative;
+extern struct NCDModuleGroup ncdmodule_ref;
+extern struct NCDModuleGroup ncdmodule_index;
+extern struct NCDModuleGroup ncdmodule_alias;
+extern struct NCDModuleGroup ncdmodule_process_manager;
+extern struct NCDModuleGroup ncdmodule_ondemand;
+extern struct NCDModuleGroup ncdmodule_foreach;
+extern struct NCDModuleGroup ncdmodule_choose;
+extern struct NCDModuleGroup ncdmodule_from_string;
+extern struct NCDModuleGroup ncdmodule_to_string;
+extern struct NCDModuleGroup ncdmodule_value;
+extern struct NCDModuleGroup ncdmodule_try;
+extern struct NCDModuleGroup ncdmodule_net_backend_waitdevice;
+extern struct NCDModuleGroup ncdmodule_net_backend_waitlink;
+extern struct NCDModuleGroup ncdmodule_net_backend_badvpn;
+extern struct NCDModuleGroup ncdmodule_net_backend_wpa_supplicant;
 #ifdef BADVPN_USE_LINUX_RFKILL
-extern const struct NCDModuleGroup ncdmodule_net_backend_rfkill;
+extern struct NCDModuleGroup ncdmodule_net_backend_rfkill;
 #endif
-extern const struct NCDModuleGroup ncdmodule_net_up;
-extern const struct NCDModuleGroup ncdmodule_net_dns;
-extern const struct NCDModuleGroup ncdmodule_net_iptables;
-extern const struct NCDModuleGroup ncdmodule_net_ipv4_addr;
-extern const struct NCDModuleGroup ncdmodule_net_ipv4_route;
-extern const struct NCDModuleGroup ncdmodule_net_ipv4_dhcp;
-extern const struct NCDModuleGroup ncdmodule_net_ipv4_arp_probe;
-extern const struct NCDModuleGroup ncdmodule_net_watch_interfaces;
-extern const struct NCDModuleGroup ncdmodule_sys_watch_input;
-extern const struct NCDModuleGroup ncdmodule_sys_watch_usb;
+extern struct NCDModuleGroup ncdmodule_net_up;
+extern struct NCDModuleGroup ncdmodule_net_dns;
+extern struct NCDModuleGroup ncdmodule_net_iptables;
+extern struct NCDModuleGroup ncdmodule_net_ipv4_addr;
+extern struct NCDModuleGroup ncdmodule_net_ipv4_route;
+extern struct NCDModuleGroup ncdmodule_net_ipv4_dhcp;
+extern struct NCDModuleGroup ncdmodule_net_ipv4_arp_probe;
+extern struct NCDModuleGroup ncdmodule_net_watch_interfaces;
+extern struct NCDModuleGroup ncdmodule_sys_watch_input;
+extern struct NCDModuleGroup ncdmodule_sys_watch_usb;
 #ifdef BADVPN_USE_LINUX_INPUT
-extern const struct NCDModuleGroup ncdmodule_sys_evdev;
+extern struct NCDModuleGroup ncdmodule_sys_evdev;
 #endif
 #ifdef BADVPN_USE_INOTIFY
-extern const struct NCDModuleGroup ncdmodule_sys_watch_directory;
+extern struct NCDModuleGroup ncdmodule_sys_watch_directory;
 #endif
-extern const struct NCDModuleGroup ncdmodule_sys_request_server;
-extern const struct NCDModuleGroup ncdmodule_net_ipv6_wait_dynamic_addr;
-extern const struct NCDModuleGroup ncdmodule_sys_request_client;
-extern const struct NCDModuleGroup ncdmodule_exit;
-extern const struct NCDModuleGroup ncdmodule_getargs;
-extern const struct NCDModuleGroup ncdmodule_arithmetic;
-extern const struct NCDModuleGroup ncdmodule_parse;
-extern const struct NCDModuleGroup ncdmodule_valuemetic;
-extern const struct NCDModuleGroup ncdmodule_file;
-extern const struct NCDModuleGroup ncdmodule_netmask;
-extern const struct NCDModuleGroup ncdmodule_implode;
-extern const struct NCDModuleGroup ncdmodule_call2;
-extern const struct NCDModuleGroup ncdmodule_assert;
-extern const struct NCDModuleGroup ncdmodule_reboot;
-extern const struct NCDModuleGroup ncdmodule_explode;
-extern const struct NCDModuleGroup ncdmodule_net_ipv6_addr;
-extern const struct NCDModuleGroup ncdmodule_net_ipv6_route;
-extern const struct NCDModuleGroup ncdmodule_net_ipv4_addr_in_network;
-extern const struct NCDModuleGroup ncdmodule_net_ipv6_addr_in_network;
+extern struct NCDModuleGroup ncdmodule_sys_request_server;
+extern struct NCDModuleGroup ncdmodule_net_ipv6_wait_dynamic_addr;
+extern struct NCDModuleGroup ncdmodule_sys_request_client;
+extern struct NCDModuleGroup ncdmodule_exit;
+extern struct NCDModuleGroup ncdmodule_getargs;
+extern struct NCDModuleGroup ncdmodule_arithmetic;
+extern struct NCDModuleGroup ncdmodule_parse;
+extern struct NCDModuleGroup ncdmodule_valuemetic;
+extern struct NCDModuleGroup ncdmodule_file;
+extern struct NCDModuleGroup ncdmodule_netmask;
+extern struct NCDModuleGroup ncdmodule_implode;
+extern struct NCDModuleGroup ncdmodule_call2;
+extern struct NCDModuleGroup ncdmodule_assert;
+extern struct NCDModuleGroup ncdmodule_reboot;
+extern struct NCDModuleGroup ncdmodule_explode;
+extern struct NCDModuleGroup ncdmodule_net_ipv6_addr;
+extern struct NCDModuleGroup ncdmodule_net_ipv6_route;
+extern struct NCDModuleGroup ncdmodule_net_ipv4_addr_in_network;
+extern struct NCDModuleGroup ncdmodule_net_ipv6_addr_in_network;
 
-static const struct NCDModuleGroup *ncd_modules[] = {
+static struct NCDModuleGroup * const ncd_modules[] = {
     &ncdmodule_var,
     &ncdmodule_list,
     &ncdmodule_depend,

+ 1 - 1
ncd/modules/multidepend.c

@@ -356,7 +356,7 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_multidepend = {
+struct NCDModuleGroup ncdmodule_multidepend = {
     .func_globalinit = func_globalinit,
     .modules = modules
 };

+ 1 - 1
ncd/modules/net_backend_badvpn.c

@@ -262,6 +262,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_net_backend_badvpn = {
+struct NCDModuleGroup ncdmodule_net_backend_badvpn = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/net_backend_rfkill.c

@@ -202,6 +202,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_net_backend_rfkill = {
+struct NCDModuleGroup ncdmodule_net_backend_rfkill = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/net_backend_waitdevice.c

@@ -181,6 +181,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_net_backend_waitdevice = {
+struct NCDModuleGroup ncdmodule_net_backend_waitdevice = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/net_backend_waitlink.c

@@ -140,6 +140,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_net_backend_waitlink = {
+struct NCDModuleGroup ncdmodule_net_backend_waitlink = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/net_backend_wpa_supplicant.c

@@ -558,6 +558,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_net_backend_wpa_supplicant = {
+struct NCDModuleGroup ncdmodule_net_backend_wpa_supplicant = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/net_dns.c

@@ -278,7 +278,7 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_net_dns = {
+struct NCDModuleGroup ncdmodule_net_dns = {
     .func_globalinit = func_globalinit,
     .modules = modules
 };

+ 1 - 1
ncd/modules/net_iptables.c

@@ -587,7 +587,7 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_net_iptables = {
+struct NCDModuleGroup ncdmodule_net_iptables = {
     .modules = modules,
     .func_globalinit = func_globalinit,
     .func_globalfree = func_globalfree

+ 1 - 1
ncd/modules/net_ipv4_addr.c

@@ -135,6 +135,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_net_ipv4_addr = {
+struct NCDModuleGroup ncdmodule_net_ipv4_addr = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/net_ipv4_addr_in_network.c

@@ -172,6 +172,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_net_ipv4_addr_in_network = {
+struct NCDModuleGroup ncdmodule_net_ipv4_addr_in_network = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/net_ipv4_arp_probe.c

@@ -204,6 +204,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_net_ipv4_arp_probe = {
+struct NCDModuleGroup ncdmodule_net_ipv4_arp_probe = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/net_ipv4_dhcp.c

@@ -331,6 +331,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_net_ipv4_dhcp = {
+struct NCDModuleGroup ncdmodule_net_ipv4_dhcp = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/net_ipv4_route.c

@@ -193,6 +193,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_net_ipv4_route = {
+struct NCDModuleGroup ncdmodule_net_ipv4_route = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/net_ipv6_addr.c

@@ -135,6 +135,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_net_ipv6_addr = {
+struct NCDModuleGroup ncdmodule_net_ipv6_addr = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/net_ipv6_addr_in_network.c

@@ -167,6 +167,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_net_ipv6_addr_in_network = {
+struct NCDModuleGroup ncdmodule_net_ipv6_addr_in_network = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/net_ipv6_route.c

@@ -195,6 +195,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_net_ipv6_route = {
+struct NCDModuleGroup ncdmodule_net_ipv6_route = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/net_ipv6_wait_dynamic_addr.c

@@ -195,6 +195,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_net_ipv6_wait_dynamic_addr = {
+struct NCDModuleGroup ncdmodule_net_ipv6_wait_dynamic_addr = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/net_up.c

@@ -105,6 +105,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_net_up = {
+struct NCDModuleGroup ncdmodule_net_up = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/net_watch_interfaces.c

@@ -467,6 +467,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_net_watch_interfaces = {
+struct NCDModuleGroup ncdmodule_net_watch_interfaces = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/netmask.c

@@ -266,6 +266,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_netmask = {
+struct NCDModuleGroup ncdmodule_netmask = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/ondemand.c

@@ -365,6 +365,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_ondemand = {
+struct NCDModuleGroup ncdmodule_ondemand = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/parse.c

@@ -304,6 +304,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_parse = {
+struct NCDModuleGroup ncdmodule_parse = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/print.c

@@ -201,6 +201,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_print = {
+struct NCDModuleGroup ncdmodule_print = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/process_manager.c

@@ -587,7 +587,7 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_process_manager = {
+struct NCDModuleGroup ncdmodule_process_manager = {
     .modules = modules,
     .strings = strings
 };

+ 1 - 1
ncd/modules/reboot.c

@@ -100,6 +100,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_reboot = {
+struct NCDModuleGroup ncdmodule_reboot = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/ref.c

@@ -212,6 +212,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_ref = {
+struct NCDModuleGroup ncdmodule_ref = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/regex_match.c

@@ -360,6 +360,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_regex_match = {
+struct NCDModuleGroup ncdmodule_regex_match = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/run.c

@@ -177,6 +177,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_run= {
+struct NCDModuleGroup ncdmodule_run= {
     .modules = modules
 };

+ 1 - 1
ncd/modules/runonce.c

@@ -322,6 +322,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_runonce = {
+struct NCDModuleGroup ncdmodule_runonce = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/sleep.c

@@ -138,6 +138,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_sleep = {
+struct NCDModuleGroup ncdmodule_sleep = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/spawn.c

@@ -407,7 +407,7 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_spawn = {
+struct NCDModuleGroup ncdmodule_spawn = {
     .modules = modules,
     .strings = strings
 };

+ 1 - 1
ncd/modules/strcmp.c

@@ -106,6 +106,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_strcmp = {
+struct NCDModuleGroup ncdmodule_strcmp = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/sys_evdev.c

@@ -340,6 +340,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_sys_evdev = {
+struct NCDModuleGroup ncdmodule_sys_evdev = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/sys_request_client.c

@@ -703,7 +703,7 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_sys_request_client = {
+struct NCDModuleGroup ncdmodule_sys_request_client = {
     .modules = modules,
     .strings = strings
 };

+ 1 - 1
ncd/modules/sys_request_server.c

@@ -890,7 +890,7 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_sys_request_server = {
+struct NCDModuleGroup ncdmodule_sys_request_server = {
     .modules = modules,
     .strings = strings
 };

+ 1 - 1
ncd/modules/sys_watch_directory.c

@@ -420,6 +420,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_sys_watch_directory = {
+struct NCDModuleGroup ncdmodule_sys_watch_directory = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/sys_watch_input.c

@@ -446,6 +446,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_sys_watch_input = {
+struct NCDModuleGroup ncdmodule_sys_watch_input = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/sys_watch_usb.c

@@ -414,6 +414,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_sys_watch_usb = {
+struct NCDModuleGroup ncdmodule_sys_watch_usb = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/to_string.c

@@ -113,6 +113,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_to_string = {
+struct NCDModuleGroup ncdmodule_to_string = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/try.c

@@ -296,7 +296,7 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_try = {
+struct NCDModuleGroup ncdmodule_try = {
     .modules = modules,
     .strings = strings
 };

+ 1 - 1
ncd/modules/value.c

@@ -1622,6 +1622,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_value = {
+struct NCDModuleGroup ncdmodule_value = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/valuemetic.c

@@ -218,6 +218,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_valuemetic = {
+struct NCDModuleGroup ncdmodule_valuemetic = {
     .modules = modules
 };

+ 1 - 1
ncd/modules/var.c

@@ -164,6 +164,6 @@ static const struct NCDModule modules[] = {
     }
 };
 
-const struct NCDModuleGroup ncdmodule_var = {
+struct NCDModuleGroup ncdmodule_var = {
     .modules = modules
 };

+ 3 - 3
ncd/ncd.c

@@ -312,7 +312,7 @@ int main (int argc, char **argv)
     }
     
     // add module groups to index
-    for (const struct NCDModuleGroup **g = ncd_modules; *g; g++) {
+    for (struct NCDModuleGroup * const *g = ncd_modules; *g; g++) {
         if (!NCDModuleIndex_AddGroup(&mindex, *g, &method_index)) {
             BLog(BLOG_ERROR, "NCDModuleIndex_AddGroup failed");
             goto fail2;
@@ -370,7 +370,7 @@ int main (int argc, char **argv)
     
     // init modules
     size_t num_inited_modules = 0;
-    for (const struct NCDModuleGroup **g = ncd_modules; *g; g++) {
+    for (struct NCDModuleGroup * const *g = ncd_modules; *g; g++) {
         // map strings
         if ((*g)->strings && !NCDStringIndex_GetRequests(&string_index, (*g)->strings)) {
             BLog(BLOG_ERROR, "NCDStringIndex_GetRequests failed for some module");
@@ -437,7 +437,7 @@ fail6:;
 fail5:
     // free modules
     while (num_inited_modules > 0) {
-        const struct NCDModuleGroup **g = &ncd_modules[num_inited_modules - 1];
+        struct NCDModuleGroup * const *g = &ncd_modules[num_inited_modules - 1];
         if ((*g)->func_globalfree) {
             (*g)->func_globalfree();
         }