device: make @pllink argument in link_changed() function const

This commit is contained in:
Thomas Haller
2017-01-02 15:38:24 +01:00
parent 9473943ef3
commit c2bc2fbac3
7 changed files with 20 additions and 18 deletions

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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));
}

View File

@@ -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);
}

View File

@@ -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

View File

@@ -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():