diff options
author | Thomas Haller <thaller@redhat.com> | 2015-09-15 15:39:33 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-09-18 13:18:05 +0200 |
commit | aeaf31b7a803de528019dc551e6d7513432eb937 (patch) | |
tree | 17e3dcfa1aca055ccc7846d6efca866fe3894e06 | |
parent | ef4aa6c555592123401126f66153891f9cfedb51 (diff) | |
download | NetworkManager-aeaf31b7a803de528019dc551e6d7513432eb937.tar.gz |
device/trivial: rename nm_device_get_unmanaged_flag() to nm_device_get_unmanaged()
This way, the function matches the other names like nm_device_set_unmanaged().
Arguably, the name currently makes some sense. But future commits will make
nm_device_get_unmanaged() more to be a counterpart of nm_device_set_unmanaged().
-rw-r--r-- | src/devices/nm-device.c | 10 | ||||
-rw-r--r-- | src/devices/nm-device.h | 2 | ||||
-rw-r--r-- | src/nm-manager.c | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 7e6964e69d..4226725059 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -1427,7 +1427,7 @@ device_link_changed (NMDevice *self) /* Manage externally-created software interfaces only when they are IFF_UP */ g_assert (priv->ifindex > 0); if (NM_DEVICE_GET_CLASS (self)->can_unmanaged_external_down (self)) { - gboolean external_down = nm_device_get_unmanaged_flag (self, NM_UNMANAGED_EXTERNAL_DOWN); + gboolean external_down = nm_device_get_unmanaged (self, NM_UNMANAGED_EXTERNAL_DOWN); if (external_down && NM_FLAGS_HAS (info.flags, IFF_UP)) { if (nm_device_get_state (self) < NM_DEVICE_STATE_DISCONNECTED) { @@ -7678,13 +7678,13 @@ nm_device_get_managed (NMDevice *self) } /** - * nm_device_get_unmanaged_flag(): + * nm_device_get_unmanaged(): * @self: the #NMDevice * * Returns: %TRUE if the device is unmanaged for @flag. */ gboolean -nm_device_get_unmanaged_flag (NMDevice *self, NMUnmanagedFlags flag) +nm_device_get_unmanaged (NMDevice *self, NMUnmanagedFlags flag) { return NM_FLAGS_ANY (NM_DEVICE_GET_PRIVATE (self)->unmanaged_flags, flag); } @@ -7698,7 +7698,7 @@ nm_device_get_unmanaged_flag (NMDevice *self, NMUnmanagedFlags flag) static gboolean nm_device_get_default_unmanaged (NMDevice *self) { - return nm_device_get_unmanaged_flag (self, NM_UNMANAGED_DEFAULT); + return nm_device_get_unmanaged (self, NM_UNMANAGED_DEFAULT); } static void @@ -7924,7 +7924,7 @@ nm_device_check_connection_available (NMDevice *self, if (state < NM_DEVICE_STATE_UNMANAGED) return FALSE; if ( state < NM_DEVICE_STATE_UNAVAILABLE - && nm_device_get_unmanaged_flag (self, NM_UNMANAGED_ALL & ~NM_UNMANAGED_DEFAULT)) + && nm_device_get_unmanaged (self, NM_UNMANAGED_ALL & ~NM_UNMANAGED_DEFAULT)) return FALSE; if ( state < NM_DEVICE_STATE_DISCONNECTED && ( ( !NM_FLAGS_HAS (flags, _NM_DEVICE_CHECK_CON_AVAILABLE_FOR_USER_REQUEST_WAITING_CARRIER) diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h index 9867d6b593..f70dca2049 100644 --- a/src/devices/nm-device.h +++ b/src/devices/nm-device.h @@ -431,7 +431,7 @@ typedef enum { } NMUnmanagedFlags; gboolean nm_device_get_managed (NMDevice *device); -gboolean nm_device_get_unmanaged_flag (NMDevice *device, NMUnmanagedFlags flag); +gboolean nm_device_get_unmanaged (NMDevice *device, NMUnmanagedFlags flag); void nm_device_set_unmanaged (NMDevice *device, NMUnmanagedFlags flag, gboolean unmanaged, diff --git a/src/nm-manager.c b/src/nm-manager.c index de43c4ed88..b56345eb63 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -1584,7 +1584,7 @@ recheck_assume_connection (NMDevice *device, gpointer user_data) if (manager_sleeping (self)) return FALSE; - if (nm_device_get_unmanaged_flag (device, NM_UNMANAGED_ALL & ~NM_UNMANAGED_DEFAULT)) + if (nm_device_get_unmanaged (device, NM_UNMANAGED_ALL & ~NM_UNMANAGED_DEFAULT)) return FALSE; state = nm_device_get_state (device); @@ -1613,7 +1613,7 @@ recheck_assume_connection (NMDevice *device, gpointer user_data) NM_DEVICE_STATE_REASON_CONFIG_FAILED); /* Return default-unmanaged devices to their original state */ - if (nm_device_get_unmanaged_flag (device, NM_UNMANAGED_DEFAULT)) { + if (nm_device_get_unmanaged (device, NM_UNMANAGED_DEFAULT)) { nm_device_state_changed (device, NM_DEVICE_STATE_UNMANAGED, NM_DEVICE_STATE_REASON_CONFIG_FAILED); |