diff options
author | Thomas Haller <thaller@redhat.com> | 2018-06-27 22:48:50 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-07-24 09:39:09 +0200 |
commit | 0b8e1fd9711ba1bdb6d84dc7585d1e706882bb31 (patch) | |
tree | f007efb9c05c5b4bd2e13e2f618f8ab9627e159f | |
parent | c3ab0ed60f35ad0a081066eb7eb5da6d3bf71c18 (diff) | |
download | NetworkManager-0b8e1fd9711ba1bdb6d84dc7585d1e706882bb31.tar.gz |
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.
-rw-r--r-- | src/devices/nm-device-6lowpan.c | 2 | ||||
-rw-r--r-- | src/devices/nm-device-macvlan.c | 4 | ||||
-rw-r--r-- | src/devices/nm-device-private.h | 6 | ||||
-rw-r--r-- | src/devices/nm-device-vlan.c | 4 | ||||
-rw-r--r-- | src/devices/nm-device.c | 6 |
5 files changed, 11 insertions, 11 deletions
diff --git a/src/devices/nm-device-6lowpan.c b/src/devices/nm-device-6lowpan.c index 9119ab00c3..2f395f4a2b 100644 --- a/src/devices/nm-device-6lowpan.c +++ b/src/devices/nm-device-6lowpan.c @@ -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; diff --git a/src/devices/nm-device-macvlan.c b/src/devices/nm-device-macvlan.c index dc4fb3e835..9adcd3753d 100644 --- a/src/devices/nm-device-macvlan.c +++ b/src/devices/nm-device-macvlan.c @@ -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; diff --git a/src/devices/nm-device-private.h b/src/devices/nm-device-private.h index ba28e9e429..dd928d859e 100644 --- a/src/devices/nm-device-private.h +++ b/src/devices/nm-device-private.h @@ -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 */ diff --git a/src/devices/nm-device-vlan.c b/src/devices/nm-device-vlan.c index 6d51dfe322..4cd7f768d8 100644 --- a/src/devices/nm-device-vlan.c +++ b/src/devices/nm-device-vlan.c @@ -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; diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 7ca2360b27..06265ecc09 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -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; |