summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-05-14 09:45:53 +0200
committerThomas Haller <thaller@redhat.com>2017-05-14 09:47:01 +0200
commitf4de6734a968146edff5431ca812ebf1c00c8847 (patch)
tree7a4bdfa95bed20026553e4e6cb578328d9339bec
parent019d3adbcaa78cf264733f3f1e4f98396c0f3632 (diff)
downloadNetworkManager-f4de6734a968146edff5431ca812ebf1c00c8847.tar.gz
device: remove function nm_device_is_enslaved()
There were only two callers. Let them access the field directly.
-rw-r--r--src/devices/nm-device-private.h2
-rw-r--r--src/devices/nm-device.c17
2 files changed, 2 insertions, 17 deletions
diff --git a/src/devices/nm-device-private.h b/src/devices/nm-device-private.h
index a1e4724254..1081580c48 100644
--- a/src/devices/nm-device-private.h
+++ b/src/devices/nm-device-private.h
@@ -91,8 +91,6 @@ gboolean nm_device_dhcp6_renew (NMDevice *device, gboolean release);
void nm_device_recheck_available_connections (NMDevice *device);
-gboolean nm_device_get_enslaved (NMDevice *device);
-
void nm_device_master_check_slave_physical_port (NMDevice *self, NMDevice *slave,
NMLogDomain log_domain);
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 74733cb932..a38298558a 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -2198,7 +2198,7 @@ carrier_changed (NMDevice *self, gboolean carrier)
nm_device_activate_stage3_ip6_start (self);
return;
- } else if (nm_device_get_enslaved (self) && !carrier) {
+ } else if (priv->is_enslaved && !carrier) {
/* Slaves don't deactivate when they lose carrier; for
* bonds/teams in particular that would be actively
* counterproductive.
@@ -3654,19 +3654,6 @@ nm_device_slave_notify_release (NMDevice *self, NMDeviceStateReason reason)
}
/**
- * nm_device_get_enslaved:
- * @self: the #NMDevice
- *
- * Returns: %TRUE if the device is enslaved to a master device (eg bridge or
- * bond or team), %FALSE if not
- */
-gboolean
-nm_device_get_enslaved (NMDevice *self)
-{
- return NM_DEVICE_GET_PRIVATE (self)->is_enslaved;
-}
-
-/**
* nm_device_removed:
* @self: the #NMDevice
* @unconfigure_ip_config: whether to clear the IP config objects
@@ -6009,7 +5996,7 @@ have_any_ready_slaves (NMDevice *self, const GSList *slaves)
* properties set up.
*/
for (iter = slaves; iter; iter = g_slist_next (iter)) {
- if (nm_device_get_enslaved (iter->data))
+ if (NM_DEVICE_GET_PRIVATE (NM_DEVICE (iter->data))->is_enslaved)
return TRUE;
}
return FALSE;