From ab9d36c4c4e1369b0046c83da40d1875e810eb7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Wed, 24 Jun 2015 14:21:27 +0200 Subject: [PATCH] platform: (trivial) rename @managed to @unmanaged in link_get_unmanaged() It returns unmanaged state (reads NM_UNMANAGED from udev), so "managed" was very misleading. Fixes: 85ee1f4a9c04cad8f2486f858efd5ca10cb09077 (cherry picked from commit b77fba39395c9ca9d32052531e7fb9c178e55255) --- src/platform/nm-linux-platform.c | 4 ++-- src/platform/nm-platform.c | 13 ++++++------- src/platform/nm-platform.h | 4 ++-- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 4793e0dfe7..ca71dfc907 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -2828,7 +2828,7 @@ link_get_type_name (NMPlatform *platform, int ifindex) } static gboolean -link_get_unmanaged (NMPlatform *platform, int ifindex, gboolean *managed) +link_get_unmanaged (NMPlatform *platform, int ifindex, gboolean *unmanaged) { NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE (platform); const NMPObject *link; @@ -2839,7 +2839,7 @@ link_get_unmanaged (NMPlatform *platform, int ifindex, gboolean *managed) udev_device = link->_link.udev.device; if (udev_device && g_udev_device_get_property (udev_device, "NM_UNMANAGED")) { - *managed = g_udev_device_get_property_as_boolean (udev_device, "NM_UNMANAGED"); + *unmanaged = g_udev_device_get_property_as_boolean (udev_device, "NM_UNMANAGED"); return TRUE; } diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index d72e9eafa4..4de4d34d07 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -727,20 +727,19 @@ nm_platform_link_get_type_name (NMPlatform *self, int ifindex) /** * nm_platform_link_get_unmanaged: * @self: platform instance - * @ifindex: Interface index. - * @managed: Management status in case %TRUE is returned + * @ifindex: interface index + * @unmanaged: management status (in case %TRUE is returned) * - * Returns: %TRUE if platform overrides whether the device ought - * to be managed by default. %FALSE with @managed unmodified - * otherwise. + * Returns: %TRUE if platform overrides NM default-unmanaged status, + * %FALSE otherwise (with @unmanaged unmodified). */ gboolean -nm_platform_link_get_unmanaged (NMPlatform *self, int ifindex, gboolean *managed) +nm_platform_link_get_unmanaged (NMPlatform *self, int ifindex, gboolean *unmanaged) { _CHECK_SELF (self, klass, FALSE); if (klass->link_get_unmanaged) - return klass->link_get_unmanaged (self, ifindex, managed); + return klass->link_get_unmanaged (self, ifindex, unmanaged); return FALSE; } diff --git a/src/platform/nm-platform.h b/src/platform/nm-platform.h index 7fc061c007..c5a5fa1cbf 100644 --- a/src/platform/nm-platform.h +++ b/src/platform/nm-platform.h @@ -422,7 +422,7 @@ typedef struct { NMPlatformLink *out_link); gboolean (*link_delete) (NMPlatform *, int ifindex); const char *(*link_get_type_name) (NMPlatform *, int ifindex); - gboolean (*link_get_unmanaged) (NMPlatform *, int ifindex, gboolean *managed); + gboolean (*link_get_unmanaged) (NMPlatform *, int ifindex, gboolean *unmanaged); gboolean (*link_refresh) (NMPlatform *, int ifindex); void (*process_events) (NMPlatform *self); @@ -612,7 +612,7 @@ gboolean nm_platform_link_get_user_ipv6ll_enabled (NMPlatform *self, int ifindex gconstpointer nm_platform_link_get_address (NMPlatform *self, int ifindex, size_t *length); int nm_platform_link_get_master (NMPlatform *self, int slave); -gboolean nm_platform_link_get_unmanaged (NMPlatform *self, int ifindex, gboolean *managed); +gboolean nm_platform_link_get_unmanaged (NMPlatform *self, int ifindex, gboolean *unmanaged); gboolean nm_platform_link_supports_slaves (NMPlatform *self, int ifindex); const char *nm_platform_link_get_type_name (NMPlatform *self, int ifindex);