summaryrefslogtreecommitdiff
path: root/src/nm-config.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-04-19 15:45:31 +0200
committerThomas Haller <thaller@redhat.com>2017-04-20 14:19:56 +0200
commit1940be410cc0272de2f690542f43ef7dcb7bc4e1 (patch)
tree23a85e4597fd92bd73108a75d7558cc13f54f1dd /src/nm-config.c
parent4bdb6b026a808ab718258e17d20d0472f3fcdd76 (diff)
downloadNetworkManager-1940be410cc0272de2f690542f43ef7dcb7bc4e1.tar.gz
config: remove unused NMConfig self argument from nm_config_device_state_*() API
nm_config_device_state_*() always access the file system directly, they don't cache data in NMConfig. Hence, they don't use the @self argument. Maybe those functions don't belong to nm-config.h, anyway. For lack of a better place they are there.
Diffstat (limited to 'src/nm-config.c')
-rw-r--r--src/nm-config.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/nm-config.c b/src/nm-config.c
index 2470244d2b..7c3c886861 100644
--- a/src/nm-config.c
+++ b/src/nm-config.c
@@ -1926,15 +1926,13 @@ _config_device_state_data_new (int ifindex, GKeyFile *kf)
/**
* nm_config_device_state_load:
- * @self: the NMConfig instance
* @ifindex: the ifindex for which the state is to load
*
* Returns: (transfer full): a run state object.
* Must be freed with g_free().
*/
NMConfigDeviceStateData *
-nm_config_device_state_load (NMConfig *self,
- int ifindex)
+nm_config_device_state_load (int ifindex)
{
NMConfigDeviceStateData *device_state;
char path[NM_STRLEN (NM_CONFIG_DEVICE_STATE_DIR) + 60];
@@ -1972,8 +1970,7 @@ NM_UTILS_LOOKUP_STR_DEFINE_STATIC (_device_state_managed_type_to_str, NMConfigDe
);
gboolean
-nm_config_device_state_write (NMConfig *self,
- int ifindex,
+nm_config_device_state_write (int ifindex,
NMConfigDeviceStateManagedType managed,
const char *perm_hw_addr_fake,
const char *connection_uuid)
@@ -1982,7 +1979,6 @@ nm_config_device_state_write (NMConfig *self,
GError *local = NULL;
gs_unref_keyfile GKeyFile *kf = NULL;
- g_return_val_if_fail (NM_IS_CONFIG (self), FALSE);
g_return_val_if_fail (ifindex > 0, FALSE);
g_return_val_if_fail (!connection_uuid || *connection_uuid, FALSE);
g_return_val_if_fail (managed == NM_CONFIG_DEVICE_STATE_MANAGED_TYPE_MANAGED || !connection_uuid, FALSE);
@@ -2027,8 +2023,7 @@ nm_config_device_state_write (NMConfig *self,
}
void
-nm_config_device_state_prune_unseen (NMConfig *self,
- GHashTable *seen_ifindexes)
+nm_config_device_state_prune_unseen (GHashTable *seen_ifindexes)
{
GDir *dir;
const char *fn;