summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-01-02 15:38:24 +0100
committerThomas Haller <thaller@redhat.com>2017-01-04 14:18:01 +0100
commitc2bc2fbac30c2f434385268188adc476ae99a912 (patch)
tree375c5b46bb41f10b6692c5cb29fee0d8958db2b1
parent9473943ef30005b3bcfba0be51254b1e2932174d (diff)
downloadNetworkManager-c2bc2fbac30c2f434385268188adc476ae99a912.tar.gz
device: make @pllink argument in link_changed() function const
-rw-r--r--src/devices/nm-device-ethernet.c6
-rw-r--r--src/devices/nm-device-ip-tunnel.c5
-rw-r--r--src/devices/nm-device-macvlan.c5
-rw-r--r--src/devices/nm-device-tun.c6
-rw-r--r--src/devices/nm-device-vxlan.c9
-rw-r--r--src/devices/nm-device.c4
-rw-r--r--src/devices/nm-device.h3
7 files changed, 20 insertions, 18 deletions
diff --git a/src/devices/nm-device-ethernet.c b/src/devices/nm-device-ethernet.c
index d458fffa22..da366c93f6 100644
--- a/src/devices/nm-device-ethernet.c
+++ b/src/devices/nm-device-ethernet.c
@@ -1679,10 +1679,10 @@ carrier_changed (NMDevice *device, gboolean carrier)
}
static void
-link_changed (NMDevice *device, NMPlatformLink *info)
+link_changed (NMDevice *device, const NMPlatformLink *pllink)
{
- NM_DEVICE_CLASS (nm_device_ethernet_parent_class)->link_changed (device, info);
- if (info->initialized)
+ NM_DEVICE_CLASS (nm_device_ethernet_parent_class)->link_changed (device, pllink);
+ if (pllink->initialized)
_update_s390_subchannels ((NMDeviceEthernet *) device);
}
diff --git a/src/devices/nm-device-ip-tunnel.c b/src/devices/nm-device-ip-tunnel.c
index f51c9f35a0..332e53e05e 100644
--- a/src/devices/nm-device-ip-tunnel.c
+++ b/src/devices/nm-device-ip-tunnel.c
@@ -331,9 +331,10 @@ update_properties (NMDevice *device)
}
static void
-link_changed (NMDevice *device, NMPlatformLink *info)
+link_changed (NMDevice *device,
+ const NMPlatformLink *pllink)
{
- NM_DEVICE_CLASS (nm_device_ip_tunnel_parent_class)->link_changed (device, info);
+ NM_DEVICE_CLASS (nm_device_ip_tunnel_parent_class)->link_changed (device, pllink);
update_properties (device);
}
diff --git a/src/devices/nm-device-macvlan.c b/src/devices/nm-device-macvlan.c
index 7b0e844367..917c8dcbf4 100644
--- a/src/devices/nm-device-macvlan.c
+++ b/src/devices/nm-device-macvlan.c
@@ -212,9 +212,10 @@ update_properties (NMDevice *device)
}
static void
-link_changed (NMDevice *device, NMPlatformLink *info)
+link_changed (NMDevice *device,
+ const NMPlatformLink *pllink)
{
- NM_DEVICE_CLASS (nm_device_macvlan_parent_class)->link_changed (device, info);
+ NM_DEVICE_CLASS (nm_device_macvlan_parent_class)->link_changed (device, pllink);
update_properties (device);
}
diff --git a/src/devices/nm-device-tun.c b/src/devices/nm-device-tun.c
index ea70f1a539..55de1500a3 100644
--- a/src/devices/nm-device-tun.c
+++ b/src/devices/nm-device-tun.c
@@ -122,10 +122,10 @@ get_generic_capabilities (NMDevice *dev)
}
static void
-link_changed (NMDevice *device, NMPlatformLink *info)
+link_changed (NMDevice *device,
+ const NMPlatformLink *pllink)
{
- NM_DEVICE_CLASS (nm_device_tun_parent_class)->link_changed (device, info);
-
+ NM_DEVICE_CLASS (nm_device_tun_parent_class)->link_changed (device, pllink);
reload_tun_properties (NM_DEVICE_TUN (device));
}
diff --git a/src/devices/nm-device-vxlan.c b/src/devices/nm-device-vxlan.c
index cd95a876be..e5ba1ef10c 100644
--- a/src/devices/nm-device-vxlan.c
+++ b/src/devices/nm-device-vxlan.c
@@ -152,19 +152,18 @@ get_generic_capabilities (NMDevice *dev)
}
static void
-link_changed (NMDevice *device, NMPlatformLink *info)
+link_changed (NMDevice *device,
+ const NMPlatformLink *pllink)
{
- NM_DEVICE_CLASS (nm_device_vxlan_parent_class)->link_changed (device, info);
+ NM_DEVICE_CLASS (nm_device_vxlan_parent_class)->link_changed (device, pllink);
update_properties (device);
}
static void
realize_start_notify (NMDevice *device, const NMPlatformLink *plink)
{
- g_assert (plink->type == NM_LINK_TYPE_VXLAN);
-
+ g_return_if_fail (plink->type == NM_LINK_TYPE_VXLAN);
NM_DEVICE_CLASS (nm_device_vxlan_parent_class)->realize_start_notify (device, plink);
-
update_properties (device);
}
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index c980133466..8d1fd23311 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -2119,12 +2119,12 @@ link_changed_cb (NMPlatform *platform,
}
static void
-link_changed (NMDevice *self, NMPlatformLink *info)
+link_changed (NMDevice *self, const NMPlatformLink *pllink)
{
/* Update carrier from link event if applicable. */
if ( nm_device_has_capability (self, NM_DEVICE_CAP_CARRIER_DETECT)
&& !nm_device_has_capability (self, NM_DEVICE_CAP_NONSTANDARD_CARRIER))
- nm_device_set_carrier (self, info->connected);
+ nm_device_set_carrier (self, pllink->connected);
}
static gboolean
diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h
index ab6852e40e..b843c67121 100644
--- a/src/devices/nm-device.h
+++ b/src/devices/nm-device.h
@@ -153,7 +153,8 @@ typedef struct {
NMDeviceState old_state,
NMDeviceStateReason reason);
- void (* link_changed) (NMDevice *self, NMPlatformLink *info);
+ void (* link_changed) (NMDevice *self,
+ const NMPlatformLink *pllink);
/**
* create_and_realize():