diff options
author | Thomas Haller <thaller@redhat.com> | 2015-10-07 12:07:51 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-10-07 16:48:48 +0200 |
commit | 823ce8bf7338980c94fc9c694d133cbc1fd40aac (patch) | |
tree | 2e2fa612e4bdcc3b7d6d20c66de8d501b994dbaa | |
parent | 78ca961c0fd0e5b563e33306299bd1058fa2e289 (diff) | |
download | NetworkManager-823ce8bf7338980c94fc9c694d133cbc1fd40aac.tar.gz |
device: rename nm_device_activate_*() functions
The function name is logged, so change them to be more suitable:
- drop the "nm_device_" prefix. It is redundant in the logging,
and usually our static functions don't have an nm-prefix.
- have all functions now start with "activate_stagex_". The
stage number corresponds to what we are currently logging
during activation:
"Activation: Stage 1 of 5 (Device Prepare)..."
No other functions start with a "activate_stagex_" prefix,
so it's easy to grep.
-rw-r--r-- | src/devices/nm-device.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 0088e894d1..5414d28f7b 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -2966,13 +2966,13 @@ act_stage1_prepare (NMDevice *self, NMDeviceStateReason *reason) } /* - * nm_device_activate_stage1_device_prepare + * activate_stage1_device_prepare * * Prepare for device activation * */ static void -nm_device_activate_stage1_device_prepare (NMDevice *self) +activate_stage1_device_prepare (NMDevice *self) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); NMActStageReturn ret = NM_ACT_STAGE_RETURN_SUCCESS; @@ -3022,7 +3022,7 @@ nm_device_activate_schedule_stage1_device_prepare (NMDevice *self) priv = NM_DEVICE_GET_PRIVATE (self); g_return_if_fail (priv->act_request); - activation_source_schedule (self, nm_device_activate_stage1_device_prepare, AF_INET); + activation_source_schedule (self, activate_stage1_device_prepare, AF_INET); _LOGD (LOGD_DEVICE, "Activation: Stage 1 of 5 (Device Prepare) scheduled..."); } @@ -3035,14 +3035,14 @@ act_stage2_config (NMDevice *self, NMDeviceStateReason *reason) } /* - * nm_device_activate_stage2_device_config + * activate_stage2_device_config * * Determine device parameters and set those on the device, ie * for wireless devices, set SSID, keys, etc. * */ static void -nm_device_activate_stage2_device_config (NMDevice *self) +activate_stage2_device_config (NMDevice *self) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); NMActStageReturn ret; @@ -3136,7 +3136,7 @@ nm_device_activate_schedule_stage2_device_config (NMDevice *self) } } - activation_source_schedule (self, nm_device_activate_stage2_device_config, AF_INET); + activation_source_schedule (self, activate_stage2_device_config, AF_INET); _LOGD (LOGD_DEVICE, "Activation: Stage 2 of 5 (Device Configure) scheduled..."); } @@ -5545,13 +5545,13 @@ nm_device_activate_stage3_ip6_start (NMDevice *self) } /* - * nm_device_activate_stage3_ip_config_start + * activate_stage3_ip_config_start * * Begin automatic/manual IP configuration * */ static void -nm_device_activate_stage3_ip_config_start (NMDevice *self) +activate_stage3_ip_config_start (NMDevice *self) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); NMActiveConnection *master; @@ -5627,7 +5627,7 @@ fw_change_zone_cb (NMFirewallManager *firewall_manager, if (priv->state == NM_DEVICE_STATE_IP_CHECK) nm_device_start_ip_check (self); else { - activation_source_schedule (self, nm_device_activate_stage3_ip_config_start, AF_INET); + activation_source_schedule (self, activate_stage3_ip_config_start, AF_INET); _LOGD (LOGD_DEVICE, "Activation: Stage 3 of 5 (IP Configure Start) scheduled."); } } @@ -5661,7 +5661,7 @@ nm_device_activate_schedule_stage3_ip_config_start (NMDevice *self) if (nm_device_uses_assumed_connection (self)) { _LOGD (LOGD_DEVICE, "Activation: skip setting firewall zone '%s' for assumed device", zone ? zone : "default"); - activation_source_schedule (self, nm_device_activate_stage3_ip_config_start, AF_INET); + activation_source_schedule (self, activate_stage3_ip_config_start, AF_INET); _LOGD (LOGD_DEVICE, "Activation: Stage 3 of 5 (IP Configure Start) scheduled."); return; } @@ -5693,7 +5693,7 @@ act_stage4_ip4_config_timeout (NMDevice *self, NMDeviceStateReason *reason) * */ static void -nm_device_activate_ip4_config_timeout (NMDevice *self) +activate_stage4_ip4_config_timeout (NMDevice *self) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE; @@ -5735,7 +5735,7 @@ nm_device_activate_schedule_ip4_config_timeout (NMDevice *self) priv = NM_DEVICE_GET_PRIVATE (self); g_return_if_fail (priv->act_request); - activation_source_schedule (self, nm_device_activate_ip4_config_timeout, AF_INET); + activation_source_schedule (self, activate_stage4_ip4_config_timeout, AF_INET); _LOGD (LOGD_DEVICE | LOGD_IP4, "Activation: Stage 4 of 5 (IPv4 Configure Timeout) scheduled..."); } @@ -5754,13 +5754,13 @@ act_stage4_ip6_config_timeout (NMDevice *self, NMDeviceStateReason *reason) /* - * nm_device_activate_ip6_config_timeout + * activate_stage4_ip6_config_timeout * * Time out on retrieving the IPv6 config. * */ static void -nm_device_activate_ip6_config_timeout (NMDevice *self) +activate_stage4_ip6_config_timeout (NMDevice *self) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE; @@ -5802,7 +5802,7 @@ nm_device_activate_schedule_ip6_config_timeout (NMDevice *self) priv = NM_DEVICE_GET_PRIVATE (self); g_return_if_fail (priv->act_request); - activation_source_schedule (self, nm_device_activate_ip6_config_timeout, AF_INET6); + activation_source_schedule (self, activate_stage4_ip6_config_timeout, AF_INET6); _LOGD (LOGD_DEVICE | LOGD_IP6, "Activation: Stage 4 of 5 (IPv6 Configure Timeout) scheduled..."); } @@ -6011,7 +6011,7 @@ arp_announce (NMDevice *self) } static void -nm_device_activate_ip4_config_commit (NMDevice *self) +activate_stage5_ip4_config_commit (NMDevice *self) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); NMActRequest *req; @@ -6113,7 +6113,7 @@ nm_device_activate_schedule_ip4_config_result (NMDevice *self, NMIP4Config *conf priv->dev_ip4_config = g_object_ref (config); nm_device_queued_ip_config_change_clear (self); - activation_source_schedule (self, nm_device_activate_ip4_config_commit, AF_INET); + activation_source_schedule (self, activate_stage5_ip4_config_commit, AF_INET); _LOGD (LOGD_DEVICE | LOGD_IP4, "Activation: Stage 5 of 5 (IPv4 Configure Commit) scheduled..."); } @@ -6133,7 +6133,7 @@ nm_device_activate_ip4_state_in_wait (NMDevice *self) } static void -nm_device_activate_ip6_config_commit (NMDevice *self) +activate_stage5_ip6_config_commit (NMDevice *self) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); NMActRequest *req; @@ -6202,7 +6202,7 @@ nm_device_activate_schedule_ip6_config_result (NMDevice *self) if (priv->ip6_state == IP_FAIL) priv->ip6_state = IP_CONF; - activation_source_schedule (self, nm_device_activate_ip6_config_commit, AF_INET6); + activation_source_schedule (self, activate_stage5_ip6_config_commit, AF_INET6); _LOGD (LOGD_DEVICE | LOGD_IP6, "Activation: Stage 5 of 5 (IPv6 Commit) scheduled..."); } @@ -9434,13 +9434,13 @@ _activation_func_to_string (ActivationHandleFunc func) if ((func) == (f)) \ return #f; \ } G_STMT_END - FUNC_TO_STRING_CHECK_AND_RETURN (func, nm_device_activate_stage1_device_prepare); - FUNC_TO_STRING_CHECK_AND_RETURN (func, nm_device_activate_stage2_device_config); - FUNC_TO_STRING_CHECK_AND_RETURN (func, nm_device_activate_stage3_ip_config_start); - FUNC_TO_STRING_CHECK_AND_RETURN (func, nm_device_activate_ip4_config_timeout); - FUNC_TO_STRING_CHECK_AND_RETURN (func, nm_device_activate_ip6_config_timeout); - FUNC_TO_STRING_CHECK_AND_RETURN (func, nm_device_activate_ip4_config_commit); - FUNC_TO_STRING_CHECK_AND_RETURN (func, nm_device_activate_ip6_config_commit); + FUNC_TO_STRING_CHECK_AND_RETURN (func, activate_stage1_device_prepare); + FUNC_TO_STRING_CHECK_AND_RETURN (func, activate_stage2_device_config); + FUNC_TO_STRING_CHECK_AND_RETURN (func, activate_stage3_ip_config_start); + FUNC_TO_STRING_CHECK_AND_RETURN (func, activate_stage4_ip4_config_timeout); + FUNC_TO_STRING_CHECK_AND_RETURN (func, activate_stage4_ip6_config_timeout); + FUNC_TO_STRING_CHECK_AND_RETURN (func, activate_stage5_ip4_config_commit); + FUNC_TO_STRING_CHECK_AND_RETURN (func, activate_stage5_ip6_config_commit); g_return_val_if_reached ("unknown"); } |