utils: rename NM_SETTINGS_AUTO_CONNECT_* to NM_SETTINGS_AUTOCONNECT_*

This commit is contained in:
Fernando Fernandez Mancera 2023-02-09 21:04:15 +01:00
parent b73b34c3ee
commit 81fbe0634e
7 changed files with 37 additions and 37 deletions

View file

@ -1866,7 +1866,7 @@ nm_linux_platform_setup_with_tc_cache(void)
NM_UTILS_FLAGS2STR_DEFINE(
nm_settings_autoconnect_blocked_reason_to_string,
NMSettingsAutoconnectBlockedReason,
NM_UTILS_FLAGS2STR(NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_NONE, "none"),
NM_UTILS_FLAGS2STR(NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_USER_REQUEST, "user-request"),
NM_UTILS_FLAGS2STR(NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_FAILED, "failed"),
NM_UTILS_FLAGS2STR(NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_NO_SECRETS, "no-secrets"), );
NM_UTILS_FLAGS2STR(NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_NONE, "none"),
NM_UTILS_FLAGS2STR(NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_USER_REQUEST, "user-request"),
NM_UTILS_FLAGS2STR(NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_FAILED, "failed"),
NM_UTILS_FLAGS2STR(NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_NO_SECRETS, "no-secrets"), );

View file

@ -229,16 +229,16 @@ void nm_utils_ip_routes_to_dbus(int addr_family,
/*****************************************************************************/
typedef enum _nm_packed {
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_NONE = 0,
NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_NONE = 0,
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_USER_REQUEST = (1LL << 0),
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_FAILED = (1LL << 1),
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_NO_SECRETS = (1LL << 2),
NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_USER_REQUEST = (1LL << 0),
NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_FAILED = (1LL << 1),
NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_NO_SECRETS = (1LL << 2),
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_ALL =
(NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_USER_REQUEST
| NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_FAILED
| NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_NO_SECRETS),
NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_ALL =
(NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_USER_REQUEST
| NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_FAILED
| NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_NO_SECRETS),
} NMSettingsAutoconnectBlockedReason;
const char *

View file

@ -244,7 +244,7 @@ ovsdb_interface_failed(NMOvsdb *ovsdb,
nm_device_get_manager(device),
device,
connection,
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_FAILED,
NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_FAILED,
TRUE);
}

View file

@ -1386,7 +1386,7 @@ nm_manager_devcon_autoconnect_reset_reconnect_all(NMManager *self,
/* we only reset the no-secrets blocked flag. */
if (nm_settings_connection_autoconnect_blocked_reason_set(
sett_conn,
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_NO_SECRETS,
NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_NO_SECRETS,
FALSE)) {
/* maybe the connection is still blocked afterwards for other reasons
* and in the larger picture nothing changed. Check if the connection
@ -1407,8 +1407,8 @@ nm_manager_devcon_autoconnect_reset_reconnect_all(NMManager *self,
self,
device,
sett_conn,
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_FAILED
| NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_USER_REQUEST,
NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_FAILED
| NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_USER_REQUEST,
FALSE))
changed = TRUE;
@ -1416,8 +1416,8 @@ nm_manager_devcon_autoconnect_reset_reconnect_all(NMManager *self,
* happened, then it means the status changed */
if (nm_settings_connection_autoconnect_blocked_reason_set(
sett_conn,
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_NO_SECRETS
| NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_USER_REQUEST,
NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_NO_SECRETS
| NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_USER_REQUEST,
FALSE))
changed = TRUE;
@ -1466,7 +1466,7 @@ nm_manager_devcon_autoconnect_is_blocked(NMManager *self,
return TRUE;
data = _devcon_lookup_data(self, device, sett_conn, TRUE);
if (data->autoconnect.blocked_reason != NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_NONE)
if (data->autoconnect.blocked_reason != NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_NONE)
return TRUE;
if (data->autoconnect.retries == 0 && data->autoconnect.initialized)
@ -5597,7 +5597,7 @@ _internal_activate_device(NMManager *self, NMActiveConnection *active, GError **
if (nm_active_connection_get_activation_reason(active)
== NM_ACTIVATION_REASON_AUTOCONNECT
&& NM_FLAGS_HAS(nm_settings_connection_autoconnect_blocked_reason_get(parent_con),
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_USER_REQUEST)) {
NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_USER_REQUEST)) {
g_set_error(error,
NM_MANAGER_ERROR,
NM_MANAGER_ERROR_DEPENDENCY_FAILED,
@ -6228,7 +6228,7 @@ _activation_auth_done(NMManager *self,
nm_settings_connection_autoconnect_blocked_reason_set(
connection,
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_USER_REQUEST,
NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_USER_REQUEST,
FALSE);
g_dbus_method_invocation_return_value(
invocation,

View file

@ -1332,7 +1332,7 @@ pending_ac_state_changed(NMActiveConnection *ac, guint state, guint reason, NMPo
priv->manager,
nm_active_connection_get_device(ac),
con,
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_FAILED,
NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_FAILED,
TRUE);
schedule_activate_check(self, nm_active_connection_get_device(ac));
}
@ -1441,7 +1441,7 @@ auto_activate_device(NMPolicy *self, NMDevice *device)
priv->manager,
device,
best_connection,
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_FAILED,
NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_FAILED,
TRUE);
schedule_activate_check(self, device);
return;
@ -1609,7 +1609,7 @@ nm_policy_unblock_failed_ovs_interfaces(NMPolicy *self)
priv->manager,
NULL,
sett_conn,
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_FAILED,
NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_FAILED,
FALSE);
}
}
@ -1836,7 +1836,7 @@ activate_slave_connections(NMPolicy *self, NMDevice *device)
priv->manager,
NULL,
sett_conn,
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_FAILED,
NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_FAILED,
FALSE)) {
if (!nm_settings_connection_autoconnect_is_blocked(sett_conn))
changed = TRUE;
@ -1963,7 +1963,7 @@ device_state_changed(NMDevice *device,
priv->manager,
device,
sett_conn,
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_FAILED,
NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_FAILED,
TRUE);
}
break;
@ -2004,7 +2004,7 @@ device_state_changed(NMDevice *device,
nm_settings_connection_get_id(sett_conn));
nm_settings_connection_autoconnect_blocked_reason_set(
sett_conn,
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_NO_SECRETS,
NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_NO_SECRETS,
TRUE);
blocked = TRUE;
}
@ -2027,7 +2027,7 @@ device_state_changed(NMDevice *device,
priv->manager,
device,
sett_conn,
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_FAILED,
NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_FAILED,
TRUE);
blocked = TRUE;
}
@ -2090,25 +2090,25 @@ device_state_changed(NMDevice *device,
case NM_DEVICE_STATE_DEACTIVATING:
if (sett_conn) {
NMSettingsAutoconnectBlockedReason blocked_reason =
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_NONE;
NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_NONE;
switch (nm_device_state_reason_check(reason)) {
case NM_DEVICE_STATE_REASON_USER_REQUESTED:
blocked_reason = NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_USER_REQUEST;
blocked_reason = NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_USER_REQUEST;
break;
case NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED:
blocked_reason = NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_FAILED;
blocked_reason = NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_FAILED;
break;
default:
break;
}
if (blocked_reason != NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_NONE) {
if (blocked_reason != NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_NONE) {
_LOGD(LOGD_DEVICE,
"blocking autoconnect of connection '%s': %s",
nm_settings_connection_get_id(sett_conn),
NM_UTILS_LOOKUP_STR_A(nm_device_state_reason_to_string,
nm_device_state_reason_check(reason)));
if (blocked_reason == NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_FAILED)
if (blocked_reason == NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_FAILED)
nm_manager_devcon_autoconnect_blocked_reason_set(priv->manager,
device,
sett_conn,
@ -2160,7 +2160,7 @@ device_state_changed(NMDevice *device,
priv->manager,
device,
sett_conn,
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_ALL,
NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_ALL,
FALSE);
break;
case NM_DEVICE_STATE_SECONDARIES:

View file

@ -1502,7 +1502,7 @@ update_auth_cb(NMSettingsConnection *self,
/* New secrets, allow autoconnection again */
if (nm_settings_connection_autoconnect_blocked_reason_set(
self,
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_NO_SECRETS,
NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_NO_SECRETS,
FALSE)
&& !nm_settings_connection_autoconnect_blocked_reason_get(self))
nm_manager_devcon_autoconnect_retries_reset(
@ -2544,7 +2544,7 @@ nm_settings_connection_autoconnect_is_blocked(NMSettingsConnection *self)
priv = NM_SETTINGS_CONNECTION_GET_PRIVATE(self);
if (priv->autoconnect_blocked_reason != NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_NONE)
if (priv->autoconnect_blocked_reason != NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_NONE)
return TRUE;
flags = priv->flags;

View file

@ -1119,7 +1119,7 @@ _connection_changed_update(NMSettings *self,
if (NM_FLAGS_HAS(update_reason, NM_SETTINGS_CONNECTION_UPDATE_REASON_BLOCK_AUTOCONNECT)) {
nm_settings_connection_autoconnect_blocked_reason_set(
sett_conn,
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_USER_REQUEST,
NM_SETTINGS_AUTOCONNECT_BLOCKED_REASON_USER_REQUEST,
TRUE);
}