@@ -851,7 +851,7 @@ struct NCDModuleGroup {
* Array of module backends. The array must be terminated with a
* structure that has a NULL type member.
*/
- const struct NCDModule *modules;
+ struct NCDModule *modules;
/**
* A pointer to an array of requests for string identifiers. The 'str'
@@ -202,7 +202,7 @@ static int func_getobj (void *vo, NCD_string_id_t name, NCDObject *out_object)
return NCDObject_GetObj(&obj2, name, out_object);
}
-static const struct NCDModule modules[] = {
+static struct NCDModule modules[] = {
{
.type = "alias",
.func_new2 = func_new,
@@ -279,7 +279,7 @@ static void func_new_modulo (void *vo, NCDModuleInst *i, const struct NCDModuleI
new_templ(vo, i, params, compute_modulo);
.type = "num_lesser",
.func_new2 = func_new_lesser,
@@ -86,7 +86,7 @@ static void func_new_false (void *unused, NCDModuleInst *i, const struct NCDModu
func_new_common(i, params, 1);
.type = "assert",
.func_new2 = func_new
@@ -322,7 +322,7 @@ static void use_func_die (void *vo)
NCDModuleInst_Backend_Dead(o->i);
.type = "blocker",
@@ -323,7 +323,7 @@ static int ref_obj_func_getobj (struct instance *o, NCD_string_id_t name, NCDObj
return NCDModuleInst_Backend_GetObj(o->crh->i, name, out_object);
.type = "callrefhere",
.func_new2 = callrefhere_func_new,
@@ -418,7 +418,7 @@ static int func_getobj (void *vo, NCD_string_id_t name, NCDObject *out_object)
return NCDModuleProcess_GetObj(&o->process, name, out_object);
.type = "call2",
.func_new2 = func_new_call,
@@ -131,7 +131,7 @@ static int func_getvar (void *vo, const char *name, NCDValMem *mem, NCDValRef *o
return 0;
.type = "choose",
@@ -118,7 +118,7 @@ static int func_getvar (void *vo, const char *name, NCDValMem *mem, NCDValRef *o
.type = "concat",
@@ -129,7 +129,7 @@ static int func_getvar (void *vo, const char *name, NCDValMem *mem, NCDValRef *o
.type = "concatv",
@@ -256,7 +256,7 @@ static void func_die (void *vo)
o->state = STATE_RUNNING_DIE;
.type = "daemon",
@@ -389,7 +389,7 @@ static int depend_func_getobj (void *vo, NCD_string_id_t objname, NCDObject *out
return NCDModuleInst_Backend_GetObj(o->p->i, objname, out_object);
.type = "provide",
.func_new2 = provide_func_new,
@@ -475,7 +475,7 @@ static int depend_func_getobj (void *vo, NCD_string_id_t objname, NCDObject *out
return NCDModuleInst_Backend_GetObj(n->cur_p->i, objname, out_object);
.type = "dynamic_provide",
@@ -78,7 +78,7 @@ fail0:
NCDModuleInst_Backend_Dead(i);
.type = "exit",
@@ -215,7 +215,7 @@ fail:
return 1;
.type = "explode",
@@ -305,7 +305,7 @@ static int stat_func_getvar (void *vo, const char *name, NCDValMem *mem, NCDValR
.type = "file_read",
.func_new2 = read_func_new,
@@ -697,7 +697,7 @@ static void func_clean (void *vo)
return;
.type = "foreach",
.func_new2 = func_new_foreach,
@@ -112,7 +112,7 @@ static int func_getvar (void *vo, const char *name, NCDValMem *mem, NCDValRef *o
.type = "from_string",
@@ -77,7 +77,7 @@ static int func_getvar (void *vo, const char *name, NCDValMem *mem, NCDValRef *o
.type = "getargs",
@@ -86,7 +86,7 @@ static void func_new_not (void *unused, NCDModuleInst *i, const struct NCDModule
new_templ(i, params, 1);
.type = "if",
@@ -307,7 +307,7 @@ static void func_die (void *vo)
.type = "imperative",
@@ -141,7 +141,7 @@ static int func_getvar (void *vo, const char *name, NCDValMem *mem, NCDValRef *o
.type = "implode",
@@ -149,7 +149,7 @@ static int func_getvar (void *vo, const char *name, NCDValMem *mem, NCDValRef *o
.type = "index",
.func_new2 = func_new_from_value,
@@ -841,7 +841,7 @@ fail0:
.type = "list",
.func_new2 = func_new_list,
@@ -138,7 +138,7 @@ static int func_getvar (void *vo, const char *name, NCDValMem *mem, NCDValRef *o
.type = "not",
.func_new2 = func_new_not,
@@ -337,7 +337,7 @@ static int depend_func_getobj (void *vo, NCD_string_id_t objname, NCDObject *out
return NCDModuleInst_Backend_GetObj(o->provide->i, objname, out_object);
.type = "multiprovide",
@@ -251,7 +251,7 @@ static void func_die (void *vo)
o->dying = 1;
.type = "net.backend.badvpn",
@@ -191,7 +191,7 @@ static void func_die (void *vo)
.type = "net.backend.rfkill",
@@ -170,7 +170,7 @@ static void func_die (void *vo)
.type = "net.backend.waitdevice",
@@ -129,7 +129,7 @@ static void func_die (void *vo)
instance_free(o);
.type = "net.backend.waitlink",
@@ -546,7 +546,7 @@ static int func_getvar (void *vo, const char *name, NCDValMem *mem, NCDValRef *o
.type = "net.backend.wpa_supplicant",
@@ -267,7 +267,7 @@ static void func_die (void *vo)
.type = "net.dns",
@@ -541,7 +541,7 @@ static void unlock_free (struct unlock_instance *o)
.type = "net.iptables.append",
.func_new2 = append_iptables_func_new,
@@ -124,7 +124,7 @@ static void func_die (void *vo)
.type = "net.ipv4.addr",
@@ -151,7 +151,7 @@ static int func_getvar (void *vo, const char *name, NCDValMem *mem, NCDValRef *o
.type = "net.ipv4.addr_in_network",
.func_new2 = func_new_normal,
@@ -192,7 +192,7 @@ static int func_getvar (void *vo, const char *name, NCDValMem *mem, NCDValRef *o
.type = "net.ipv4.arp_probe",
@@ -319,7 +319,7 @@ fail:
.type = "net.ipv4.dhcp",
@@ -182,7 +182,7 @@ static void func_die (void *vo)
.type = "net.ipv4.route",
.type = "net.ipv6.addr",
.type = "net.ipv6.addr_in_network",
@@ -184,7 +184,7 @@ static void func_die (void *vo)
.type = "net.ipv6.route",
@@ -183,7 +183,7 @@ static int func_getvar (void *vo, const char *name, NCDValMem *mem, NCDValRef *o
.type = "net.ipv6.wait_dynamic_addr",
@@ -94,7 +94,7 @@ static void func_die (void *vo)
.type = "net.up",
@@ -452,7 +452,7 @@ fail0:
.type = "net.watch_interfaces",
@@ -242,7 +242,7 @@ static int prefix_func_getvar (void *vo, const char *name, NCDValMem *mem, NCDVa
.type = "ipv4_prefix_to_mask",
.func_new2 = prefix_to_mask_func_init,
@@ -348,7 +348,7 @@ static int demand_func_getobj (void *vo, NCD_string_id_t objname, NCDObject *out
return NCDModuleProcess_GetObj(&o->od->process, objname, out_object);
.type = "ondemand",
.func_new2 = ondemand_func_new,
@@ -275,7 +275,7 @@ static int ipv4_cidr_addr_func_getvar (void *vo, const char *name, NCDValMem *me
.type = "parse_number",
.func_new2 = func_new_parse_number,
@@ -179,7 +179,7 @@ static void rprintln_func_new (void *vo, NCDModuleInst *i, const struct NCDModul
return rprint_func_new_common(vo, i, params, 1);
.type = "print",
.func_new2 = print_func_new
@@ -570,7 +570,7 @@ fail0:
.type = "process_manager",
@@ -88,7 +88,7 @@ fail0:
.type = "hard_reboot",
.func_new2 = func_new_hard_reboot
@@ -186,7 +186,7 @@ static int ref_func_getobj (void *vo, NCD_string_id_t objname, NCDObject *out_ob
return NCDModuleInst_Backend_GetObj(o->rh->i, objname, out_object);
.type = "refhere",
.func_new2 = refhere_func_new,
@@ -343,7 +343,7 @@ static int replace_func_getvar (void *vo, const char *name, NCDValMem *mem, NCDV
.type = "regex_match",
@@ -166,7 +166,7 @@ static void func_die (void *vo)
command_template_die(&o->cti);
.type = "run",
@@ -310,7 +310,7 @@ static int func_getvar (void *vo, const char *name, NCDValMem *mem, NCDValRef *o
.type = "runonce",
@@ -127,7 +127,7 @@ static void func_die (void *vo)
BReactor_SetTimerAfter(o->i->params->iparams->reactor, &o->timer, o->ms_stop);
.type = "sleep",
@@ -383,7 +383,7 @@ static void join_func_clean (void *vo)
.type = "spawn",
@@ -95,7 +95,7 @@ static int func_getvar (void *vo, const char *name, NCDValMem *mem, NCDValRef *o
.type = "strcmp",
@@ -325,7 +325,7 @@ fail0:
.type = "sys.evdev",
@@ -687,7 +687,7 @@ static void request_func_die (void *vo)
request_die(o, 0);
.type = "sys.request_client",
@@ -873,7 +873,7 @@ fail:
.type = "sys.request_server",
@@ -405,7 +405,7 @@ fail0:
.type = "sys.watch_directory",
@@ -431,7 +431,7 @@ fail0:
.type = "sys.watch_input",
@@ -399,7 +399,7 @@ fail0:
.type = "sys.watch_usb",
@@ -101,7 +101,7 @@ static int func_getvar (void *vo, const char *name, NCDValMem *mem, NCDValRef *o
.type = "to_string",
@@ -281,7 +281,7 @@ fail1:
.type = "try",
@@ -1531,7 +1531,7 @@ fail0:
.type = "value",
.func_new2 = func_new_value,
@@ -176,7 +176,7 @@ static void func_new_different (void *vo, NCDModuleInst *i, const struct NCDModu
new_templ(vo, i, params, compute_different);
.type = "val_lesser",
@@ -149,7 +149,7 @@ fail0:
.type = "var",