mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 19:02:34 +01:00
treewide: Use CamelCase for netconfig settings
This commit is contained in:
parent
e915156be1
commit
16f51f5b5e
@ -1126,10 +1126,18 @@ static int netconfig_init(void)
|
||||
return -EALREADY;
|
||||
|
||||
if (!l_settings_get_bool(iwd_get_config(), "General",
|
||||
"enable_network_config", &enabled) ||
|
||||
!enabled) {
|
||||
l_warn("netconfig: Network configuration with the IP addresses "
|
||||
"is disabled.");
|
||||
"EnableNetworkConfiguration",
|
||||
&enabled)) {
|
||||
if (l_settings_get_bool(iwd_get_config(), "General",
|
||||
"enable_network_config", &enabled))
|
||||
l_warn("[General].enable_network_config is deprecated,"
|
||||
" use [General].EnableNetworkConfiguration");
|
||||
else
|
||||
enabled = false;
|
||||
}
|
||||
|
||||
if (!enabled) {
|
||||
l_info("netconfig: Network configuration is disabled.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1172,8 +1180,8 @@ static int netconfig_init(void)
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (!l_settings_get_uint(iwd_get_config(), "General",
|
||||
"route_priority_offset",
|
||||
if (!l_settings_get_uint(iwd_get_config(), "Network",
|
||||
"RoutePriorityOffset",
|
||||
&ROUTE_PRIORITY_OFFSET))
|
||||
ROUTE_PRIORITY_OFFSET = 300;
|
||||
|
||||
|
@ -399,16 +399,27 @@ static int resolve_init(void)
|
||||
uint8_t i;
|
||||
|
||||
if (!l_settings_get_bool(iwd_get_config(), "General",
|
||||
"enable_network_config", &enabled) ||
|
||||
!enabled)
|
||||
"EnableNetworkConfiguration",
|
||||
&enabled)) {
|
||||
if (!l_settings_get_bool(iwd_get_config(), "General",
|
||||
"enable_network_config", &enabled))
|
||||
enabled = false;
|
||||
}
|
||||
|
||||
if (!enabled)
|
||||
return 0;
|
||||
|
||||
method_name = l_settings_get_value(iwd_get_config(), "Network",
|
||||
"NameResolvingService");
|
||||
if (!method_name) {
|
||||
method_name = l_settings_get_value(iwd_get_config(), "General",
|
||||
"dns_resolve_method");
|
||||
|
||||
if (!method_name)
|
||||
/* Default to systemd-resolved service. */
|
||||
if (method_name)
|
||||
l_warn("[General].dns_resolve_method is deprecated, "
|
||||
"use [Network].NameResolvingService");
|
||||
else /* Default to systemd-resolved service. */
|
||||
method_name = "systemd";
|
||||
}
|
||||
|
||||
for (i = 0; resolve_method_ops_list[i].name; i++) {
|
||||
if (strcmp(resolve_method_ops_list[i].name, method_name))
|
||||
@ -419,8 +430,10 @@ static int resolve_init(void)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!method.ops)
|
||||
if (!method.ops) {
|
||||
l_error("Unknown resolution method: %s", method_name);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (method.ops->init)
|
||||
method.data = method.ops->init();
|
||||
|
Loading…
Reference in New Issue
Block a user