summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-01-08 17:40:04 +0100
committerThomas Haller <thaller@redhat.com>2016-01-11 12:22:19 +0100
commitcdd6eb7e8e5ec91078967616075eb45eaa0274ca (patch)
tree2868e224ae2eb2ce7bf67578411f864a6c135af5
parent4021eb7e0e64ef68227c1e425fb2f7d3a227fc0e (diff)
downloadNetworkManager-cdd6eb7e8e5ec91078967616075eb45eaa0274ca.tar.gz
device: remove unneeded implementations of realize()
The virtual function NMDevice:realize() is only called by nm_device_realize() and immediately followed by nm_device_setup_start(). Devices already overwrite setup_start_notify() to update their properties. No need to duplicate that in realize().
-rw-r--r--src/devices/nm-device-ip-tunnel.c8
-rw-r--r--src/devices/nm-device-macvlan.c8
-rw-r--r--src/devices/nm-device-tun.c8
-rw-r--r--src/devices/nm-device-vxlan.c11
4 files changed, 0 insertions, 35 deletions
diff --git a/src/devices/nm-device-ip-tunnel.c b/src/devices/nm-device-ip-tunnel.c
index 8fff4dfb9c..a428e749af 100644
--- a/src/devices/nm-device-ip-tunnel.c
+++ b/src/devices/nm-device-ip-tunnel.c
@@ -449,13 +449,6 @@ update_connection (NMDevice *device, NMConnection *connection)
}
static gboolean
-realize (NMDevice *self, NMPlatformLink *plink, GError **error)
-{
- update_properties (self);
- return TRUE;
-}
-
-static gboolean
match_parent (NMDevice *dev_parent, const char *setting_parent)
{
g_return_val_if_fail (setting_parent, FALSE);
@@ -885,7 +878,6 @@ nm_device_ip_tunnel_class_init (NMDeviceIPTunnelClass *klass)
device_class->check_connection_compatible = check_connection_compatible;
device_class->create_and_realize = create_and_realize;
device_class->ip4_config_pre_commit = ip4_config_pre_commit;
- device_class->realize = realize;
device_class->realize_start_notify = realize_start_notify;
device_class->unrealize = unrealize;
diff --git a/src/devices/nm-device-macvlan.c b/src/devices/nm-device-macvlan.c
index fb6a50b97b..28421b4b3c 100644
--- a/src/devices/nm-device-macvlan.c
+++ b/src/devices/nm-device-macvlan.c
@@ -210,13 +210,6 @@ link_changed (NMDevice *device, NMPlatformLink *info)
}
static gboolean
-realize (NMDevice *device, NMPlatformLink *plink, GError **error)
-{
- update_properties (device);
- return TRUE;
-}
-
-static gboolean
create_and_realize (NMDevice *device,
NMConnection *connection,
NMDevice *parent,
@@ -652,7 +645,6 @@ nm_device_macvlan_class_init (NMDeviceMacvlanClass *klass)
device_class->is_available = is_available;
device_class->link_changed = link_changed;
device_class->notify_new_device_added = notify_new_device_added;
- device_class->realize = realize;
device_class->realize_start_notify = realize_start_notify;
device_class->update_connection = update_connection;
diff --git a/src/devices/nm-device-tun.c b/src/devices/nm-device-tun.c
index 5f150522df..d04cd7e641 100644
--- a/src/devices/nm-device-tun.c
+++ b/src/devices/nm-device-tun.c
@@ -234,13 +234,6 @@ create_and_realize (NMDevice *device,
return TRUE;
}
-static gboolean
-realize (NMDevice *device, NMPlatformLink *plink, GError **error)
-{
- reload_tun_properties (NM_DEVICE_TUN (device));
- return TRUE;
-}
-
static void
realize_start_notify (NMDevice *device, const NMPlatformLink *plink)
{
@@ -446,7 +439,6 @@ nm_device_tun_class_init (NMDeviceTunClass *klass)
device_class->complete_connection = complete_connection;
device_class->check_connection_compatible = check_connection_compatible;
device_class->create_and_realize = create_and_realize;
- device_class->realize = realize;
device_class->realize_start_notify = realize_start_notify;
device_class->unrealize = unrealize;
device_class->update_connection = update_connection;
diff --git a/src/devices/nm-device-vxlan.c b/src/devices/nm-device-vxlan.c
index 01e93ba975..3dc238ec55 100644
--- a/src/devices/nm-device-vxlan.c
+++ b/src/devices/nm-device-vxlan.c
@@ -237,16 +237,6 @@ create_and_realize (NMDevice *device,
}
static gboolean
-realize (NMDevice *device, NMPlatformLink *plink, GError **error)
-{
- g_assert (plink->type == NM_LINK_TYPE_VXLAN);
-
- update_properties (device);
-
- return TRUE;
-}
-
-static gboolean
match_parent (NMDeviceVxlan *self, const char *parent)
{
NMDeviceVxlanPrivate *priv = NM_DEVICE_VXLAN_GET_PRIVATE (self);
@@ -670,7 +660,6 @@ nm_device_vxlan_class_init (NMDeviceVxlanClass *klass)
device_class->unrealize = unrealize;
device_class->connection_type = NM_SETTING_VXLAN_SETTING_NAME;
device_class->create_and_realize = create_and_realize;
- device_class->realize = realize;
device_class->check_connection_compatible = check_connection_compatible;
device_class->complete_connection = complete_connection;
device_class->update_connection = update_connection;