mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-21 08:20:33 +01:00
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:
parent
c3ab0ed60f
commit
0b8e1fd971
5 changed files with 11 additions and 11 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue