platform: return platform error code from nm_platform_link_set_mtu()

This commit is contained in:
Thomas Haller
2017-10-23 15:16:50 +02:00
parent a53f45c15e
commit 54cbb321e5
5 changed files with 10 additions and 10 deletions

View File

@@ -4859,7 +4859,7 @@ link_get_permanent_address (NMPlatform *platform,
return nmp_utils_ethtool_get_permanent_address (ifindex, buf, length);
}
static gboolean
static NMPlatformError
link_set_mtu (NMPlatform *platform, int ifindex, guint32 mtu)
{
nm_auto_nlmsg struct nl_msg *nlmsg = NULL;
@@ -4877,7 +4877,7 @@ link_set_mtu (NMPlatform *platform, int ifindex, guint32 mtu)
NLA_PUT_U32 (nlmsg, IFLA_MTU, mtu);
return do_change_link (platform, CHANGE_LINK_TYPE_SET_MTU, ifindex, nlmsg, NULL) == NM_PLATFORM_ERROR_SUCCESS;
return do_change_link (platform, CHANGE_LINK_TYPE_SET_MTU, ifindex, nlmsg, NULL);
nla_put_failure:
g_return_val_if_reached (FALSE);
}