platform: add nmp_object_link_get_ifname() helper

This commit is contained in:
Thomas Haller 2020-07-21 12:14:17 +02:00
parent fb6e9795b7
commit bc3439d14f
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -995,4 +995,14 @@ nm_platform_lookup_object_by_addr_family (NMPlatform *platform,
return nm_platform_lookup (platform, &lookup);
}
/*****************************************************************************/
static inline const char *
nmp_object_link_get_ifname (const NMPObject *obj)
{
if (!obj)
return NULL;
return NMP_OBJECT_CAST_LINK (obj)->name;
}
#endif /* __NMP_OBJECT_H__ */