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