platform: remove unused argument preserve_rtprot from rtprot_to_source()

This commit is contained in:
Thomas Haller
2015-05-05 15:33:02 +02:00
parent 2f0d0b96db
commit 4fee05c35b

View File

@@ -1128,15 +1128,13 @@ source_to_rtprot (NMIPConfigSource source)
} }
static NMIPConfigSource static NMIPConfigSource
rtprot_to_source (guint rtprot, gboolean preserve_rtprot) rtprot_to_source (guint rtprot)
{ {
switch (rtprot) { switch (rtprot) {
case RTPROT_UNSPEC: case RTPROT_UNSPEC:
return NM_IP_CONFIG_SOURCE_UNKNOWN; return NM_IP_CONFIG_SOURCE_UNKNOWN;
case RTPROT_KERNEL: case RTPROT_KERNEL:
if (preserve_rtprot)
return _NM_IP_CONFIG_SOURCE_RTPROT_KERNEL; return _NM_IP_CONFIG_SOURCE_RTPROT_KERNEL;
/* fall through */
case RTPROT_REDIRECT: case RTPROT_REDIRECT:
return NM_IP_CONFIG_SOURCE_KERNEL; return NM_IP_CONFIG_SOURCE_KERNEL;
case RTPROT_RA: case RTPROT_RA:
@@ -1199,7 +1197,7 @@ _nmp_vt_cmd_plobj_init_from_nl_ip4_route (NMPlatform *platform, NMPlatformObject
* */ * */
obj->source = _NM_IP_CONFIG_SOURCE_RTM_F_CLONED; obj->source = _NM_IP_CONFIG_SOURCE_RTM_F_CLONED;
} else } else
obj->source = rtprot_to_source (rtnl_route_get_protocol (nlo), TRUE); obj->source = rtprot_to_source (rtnl_route_get_protocol (nlo));
return TRUE; return TRUE;
} }
@@ -1249,7 +1247,7 @@ _nmp_vt_cmd_plobj_init_from_nl_ip6_route (NMPlatform *platform, NMPlatformObject
if (rtnl_route_get_flags (nlo) & RTM_F_CLONED) if (rtnl_route_get_flags (nlo) & RTM_F_CLONED)
obj->source = _NM_IP_CONFIG_SOURCE_RTM_F_CLONED; obj->source = _NM_IP_CONFIG_SOURCE_RTM_F_CLONED;
else else
obj->source = rtprot_to_source (rtnl_route_get_protocol (nlo), TRUE); obj->source = rtprot_to_source (rtnl_route_get_protocol (nlo));
return TRUE; return TRUE;
} }