libnm: expose internal helper nm_utils_hwaddr_to_dbus()

(cherry picked from commit 8081e39ab6)
This commit is contained in:
Thomas Haller 2021-06-18 13:18:12 +02:00
parent 445d01e2c6
commit d19c0937d4
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
2 changed files with 8 additions and 4 deletions

View file

@ -3994,8 +3994,8 @@ nm_utils_hwaddr_matches(gconstpointer hwaddr1,
/*****************************************************************************/
static GVariant *
_nm_utils_hwaddr_to_dbus_impl(const char *str)
GVariant *
nm_utils_hwaddr_to_dbus(const char *str)
{
guint8 buf[NM_UTILS_HWADDR_LEN_MAX];
gsize len;
@ -4021,7 +4021,7 @@ _nm_utils_hwaddr_cloned_get(const NMSettInfoSetting * sett_info,
nm_assert(nm_streq(sett_info->property_infos[property_idx].name, "cloned-mac-address"));
g_object_get(setting, "cloned-mac-address", &addr, NULL);
return _nm_utils_hwaddr_to_dbus_impl(addr);
return nm_utils_hwaddr_to_dbus(addr);
}
static gboolean
@ -4140,7 +4140,7 @@ const NMSettInfoPropertType nm_sett_info_propert_type_assigned_mac_address = {
static GVariant *
_nm_utils_hwaddr_to_dbus(const GValue *prop_value)
{
return _nm_utils_hwaddr_to_dbus_impl(g_value_get_string(prop_value));
return nm_utils_hwaddr_to_dbus(g_value_get_string(prop_value));
}
static void

View file

@ -642,6 +642,10 @@ GVariant * nm_ip_routing_rule_to_dbus(const NMIPRoutingRule *self);
/*****************************************************************************/
GVariant *nm_utils_hwaddr_to_dbus(const char *str);
/*****************************************************************************/
typedef struct _NMSettInfoSetting NMSettInfoSetting;
typedef struct _NMSettInfoProperty NMSettInfoProperty;