core/trival: rename nm_device_match_hwaddr() function to nm_device_match_parent_hwaddr()

This name is better, because it compares the MAC address of the device's
parent.
This commit is contained in:
Thomas Haller 2018-06-27 22:48:50 +02:00
parent c3ab0ed60f
commit 0b8e1fd971
5 changed files with 11 additions and 11 deletions

View file

@ -218,7 +218,7 @@ complete_connection (NMDevice *device,
* settings, then there's not enough information to complete the setting.
*/
if ( !nm_setting_6lowpan_get_parent (s_6lowpan)
&& !nm_device_match_hwaddr (device, connection, TRUE)) {
&& !nm_device_match_parent_hwaddr (device, connection, TRUE)) {
g_set_error_literal (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_INVALID_CONNECTION,
"The '6lowpan' setting had no interface name, parent, or hardware address.");
return FALSE;

View file

@ -322,7 +322,7 @@ check_connection_compatible (NMDevice *device, NMConnection *connection)
return FALSE;
} else {
/* Parent could be a MAC address in an NMSettingWired */
if (!nm_device_match_hwaddr (device, connection, TRUE))
if (!nm_device_match_parent_hwaddr (device, connection, TRUE))
return FALSE;
}
}
@ -359,7 +359,7 @@ complete_connection (NMDevice *device,
* settings, then there's not enough information to complete the setting.
*/
if ( !nm_setting_macvlan_get_parent (s_macvlan)
&& !nm_device_match_hwaddr (device, connection, TRUE)) {
&& !nm_device_match_parent_hwaddr (device, connection, TRUE)) {
g_set_error_literal (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_INVALID_CONNECTION,
"The 'macvlan' setting had no interface name, parent, or hardware address.");
return FALSE;

View file

@ -143,8 +143,8 @@ gboolean _nm_device_hash_check_invalid_keys (GHashTable *hash, const char *setti
_nm_device_hash_check_invalid_keys (hash, setting_name, error, ((const char *[]) { __VA_ARGS__, NULL }))
gboolean nm_device_match_parent (NMDevice *device, const char *parent);
gboolean nm_device_match_hwaddr (NMDevice *device,
NMConnection *connection,
gboolean fail_if_no_hwaddr);
gboolean nm_device_match_parent_hwaddr (NMDevice *device,
NMConnection *connection,
gboolean fail_if_no_hwaddr);
#endif /* NM_DEVICE_PRIVATE_H */

View file

@ -356,7 +356,7 @@ check_connection_compatible (NMDevice *device, NMConnection *connection)
return FALSE;
} else {
/* Parent could be a MAC address in an NMSettingWired */
if (!nm_device_match_hwaddr (device, connection, TRUE))
if (!nm_device_match_parent_hwaddr (device, connection, TRUE))
return FALSE;
}
}
@ -405,7 +405,7 @@ complete_connection (NMDevice *device,
* settings, then there's not enough information to complete the setting.
*/
if ( !nm_setting_vlan_get_parent (s_vlan)
&& !nm_device_match_hwaddr (device, connection, TRUE)) {
&& !nm_device_match_parent_hwaddr (device, connection, TRUE)) {
g_set_error_literal (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_INVALID_CONNECTION,
"The 'vlan' setting had no interface name, parent, or hardware address.");
return FALSE;

View file

@ -5392,9 +5392,9 @@ nm_device_match_parent (NMDevice *self, const char *parent)
}
gboolean
nm_device_match_hwaddr (NMDevice *device,
NMConnection *connection,
gboolean fail_if_no_hwaddr)
nm_device_match_parent_hwaddr (NMDevice *device,
NMConnection *connection,
gboolean fail_if_no_hwaddr)
{
NMSettingWired *s_wired;
NMDevice *parent_device;