mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 19:50:08 +01:00
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:85ee1f4a9c(cherry picked from commitb77fba3939)
This commit is contained in:
parent
649f88de67
commit
ab9d36c4c4
3 changed files with 10 additions and 11 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue