From 6a0062e4ff57167fdbdfa014ec1be6d2cb2d347e Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Sat, 19 Oct 2019 16:33:05 +0200 Subject: [PATCH] libnm: add comment about not-implement property NMDeviceMacvlan:hw-address The server does not expose this property on D-Bus. It's always NULL. Add a comment about that. --- libnm/nm-device-macvlan.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libnm/nm-device-macvlan.c b/libnm/nm-device-macvlan.c index 4a53af07b4..d511b0b65c 100644 --- a/libnm/nm-device-macvlan.c +++ b/libnm/nm-device-macvlan.c @@ -28,7 +28,6 @@ typedef struct { char *mode; gboolean no_promisc; gboolean tap; - char *hw_address; } NMDeviceMacvlanPrivate; struct _NMDeviceMacvlan { @@ -127,13 +126,15 @@ nm_device_macvlan_get_tap (NMDeviceMacvlan *device) * device, and must not be modified. * * Since: 1.2 + * + * This property is not implemented yet, and the function always return NULL. **/ const char * nm_device_macvlan_get_hw_address (NMDeviceMacvlan *device) { g_return_val_if_fail (NM_IS_DEVICE_MACVLAN (device), NULL); - return nm_str_not_empty (NM_DEVICE_MACVLAN_GET_PRIVATE (device)->hw_address); + return NULL; } static gboolean @@ -188,7 +189,6 @@ init_dbus (NMObject *object) { NM_DEVICE_MACVLAN_MODE, &priv->mode }, { NM_DEVICE_MACVLAN_NO_PROMISC, &priv->no_promisc }, { NM_DEVICE_MACVLAN_TAP, &priv->tap }, - { NM_DEVICE_MACVLAN_HW_ADDRESS, &priv->hw_address }, { NULL }, }; @@ -205,7 +205,6 @@ finalize (GObject *object) NMDeviceMacvlanPrivate *priv = NM_DEVICE_MACVLAN_GET_PRIVATE (object); g_free (priv->mode); - g_free (priv->hw_address); g_clear_object (&priv->parent); G_OBJECT_CLASS (nm_device_macvlan_parent_class)->finalize (object); @@ -315,6 +314,8 @@ nm_device_macvlan_class_init (NMDeviceMacvlanClass *gre_class) * The hardware (MAC) address of the device. * * Since: 1.2 + * + * This property is not implemented yet, and the function always return NULL. **/ obj_properties[PROP_HW_ADDRESS] = g_param_spec_string (NM_DEVICE_MACVLAN_HW_ADDRESS, "", "",