diff options
| author | Michael Biebl <biebl@debian.org> | 2016-03-30 00:56:30 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2016-03-30 00:56:30 +0200 |
| commit | d9c99a29a0d3384c9c3d2adce430f5cb1134ab6a (patch) | |
| tree | fa41baf72753961e71dd8d5bdbe2b89c9109e4f1 /src/settings/plugins/ifupdown | |
| parent | c2de0d98ba39e0a1a970d066fd19be786092f376 (diff) | |
Imported Upstream version 1.1.92 upstream/1.1.92
Diffstat (limited to 'src/settings/plugins/ifupdown')
| -rw-r--r-- | src/settings/plugins/ifupdown/interface_parser.c | 49 | ||||
| -rw-r--r-- | src/settings/plugins/ifupdown/interface_parser.h | 2 | ||||
| -rw-r--r-- | src/settings/plugins/ifupdown/nm-ifupdown-connection.c | 117 | ||||
| -rw-r--r-- | src/settings/plugins/ifupdown/nm-ifupdown-connection.h | 4 | ||||
| -rw-r--r-- | src/settings/plugins/ifupdown/parser.c | 41 | ||||
| -rw-r--r-- | src/settings/plugins/ifupdown/parser.h | 2 | ||||
| -rw-r--r-- | src/settings/plugins/ifupdown/plugin.c | 36 | ||||
| -rw-r--r-- | src/settings/plugins/ifupdown/plugin.h | 2 |
8 files changed, 83 insertions, 170 deletions
diff --git a/src/settings/plugins/ifupdown/interface_parser.c b/src/settings/plugins/ifupdown/interface_parser.c index be7d387d..d342501b 100644 --- a/src/settings/plugins/ifupdown/interface_parser.c +++ b/src/settings/plugins/ifupdown/interface_parser.c @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager -- Network link manager * * Tom Parker <palfrey@tevp.net> @@ -50,7 +50,6 @@ void add_block(const char *type, const char* name) last = ret; } last_data = NULL; - //printf("added block '%s' with type '%s'\n",name,type); } void add_data(const char *key,const char *data) @@ -58,14 +57,15 @@ void add_data(const char *key,const char *data) if_data *ret; char *idx; - // Check if there is a block where we can attach our data + /* Check if there is a block where we can attach our data */ if (first == NULL) return; ret = (if_data*) calloc(1,sizeof(struct _if_data)); ret->key = g_strdup(key); - // Normalize keys. Convert '_' to '-', as ifupdown accepts both variants. - // When querying keys via ifparser_getkey(), use '-'. + + /* Normalize keys. Convert '_' to '-', as ifupdown accepts both variants. + * When querying keys via ifparser_getkey(), use '-'. */ while ((idx = strrchr(ret->key, '_'))) { *idx = '-'; } @@ -81,10 +81,9 @@ void add_data(const char *key,const char *data) last_data->next = ret; last_data = last_data->next; } - //printf("added data '%s' with key '%s'\n",data,key); } -// join values in src with spaces into dst; dst needs to be large enough +/* join values in src with spaces into dst; dst needs to be large enough */ static char *join_values_with_spaces(char *dst, char **src) { if (dst != NULL) { @@ -112,7 +111,7 @@ _recursive_ifparser (const char *eni_file, int quiet) int skip_long_line = 0; int offs = 0; - // Check if interfaces file exists and open it + /* Check if interfaces file exists and open it */ if (!g_file_test (eni_file, G_FILE_TEST_EXISTS)) { if (!quiet) nm_log_warn (LOGD_SETTINGS, "interfaces file %s doesn't exist\n", eni_file); @@ -130,8 +129,8 @@ _recursive_ifparser (const char *eni_file, int quiet) while (!feof(inp)) { - char *token[128]; // 255 chars can only be split into 127 tokens - char value[255]; // large enough to join previously split tokens + char *token[128]; /* 255 chars can only be split into 127 tokens */ + char value[255]; /* large enough to join previously split tokens */ char *safeptr; int toknum; int len = 0; @@ -141,7 +140,7 @@ _recursive_ifparser (const char *eni_file, int quiet) break; len = strlen(line); - // skip over-long lines + /* skip over-long lines */ if (!feof(inp) && len > 0 && line[len-1] != '\n') { if (!skip_long_line) { if (!quiet) @@ -151,35 +150,33 @@ _recursive_ifparser (const char *eni_file, int quiet) continue; } - // trailing '\n' found: remove it & reset offset to 0 + /* trailing '\n' found: remove it & reset offset to 0 */ if (len > 0 && line[len-1] == '\n') { line[--len] = '\0'; offs = 0; } - // if we're in long_line_skip mode, terminate it for real next line + /* if we're in long_line_skip mode, terminate it for real next line */ if (skip_long_line) { if (len == 0 || line[len-1] != '\\') skip_long_line = 0; continue; } - // unwrap wrapped lines + /* unwrap wrapped lines */ if (len > 0 && line[len-1] == '\\') { offs = len - 1; continue; } - //printf(">>%s<<\n", line); - #define SPACES " \t" - // tokenize input; + /* tokenize input; */ for (toknum = 0, token[toknum] = strtok_r(line, SPACES, &safeptr); token[toknum] != NULL; toknum++, token[toknum] = strtok_r(NULL, SPACES, &safeptr)) ; - // ignore comments and empty lines + /* ignore comments and empty lines */ if (toknum == 0 || *token[0]=='#') continue; @@ -192,11 +189,11 @@ _recursive_ifparser (const char *eni_file, int quiet) continue; } - // There are five different stanzas: - // iface, mapping, auto, allow-* and source. - // Create a block for each of them except source. + /* There are five different stanzas: + * iface, mapping, auto, allow-* and source. + * Create a block for each of them except source. */ - // iface stanza takes at least 3 parameters + /* iface stanza takes at least 3 parameters */ if (strcmp(token[0], "iface") == 0) { if (toknum < 4) { if (!quiet) { @@ -209,8 +206,8 @@ _recursive_ifparser (const char *eni_file, int quiet) skip_to_block = 0; add_data(token[2], join_values_with_spaces(value, token + 3)); } - // auto and allow-auto stanzas are equivalent, - // both can take multiple interfaces as parameters: add one block for each + /* auto and allow-auto stanzas are equivalent, + * both can take multiple interfaces as parameters: add one block for each */ else if (strcmp(token[0], "auto") == 0 || strcmp(token[0], "allow-auto") == 0) { int i; @@ -222,14 +219,14 @@ _recursive_ifparser (const char *eni_file, int quiet) add_block(token[0], join_values_with_spaces(value, token + 1)); skip_to_block = 0; } - // allow-* can take multiple interfaces as parameters: add one block for each + /* allow-* can take multiple interfaces as parameters: add one block for each */ else if (strncmp(token[0],"allow-",6) == 0) { int i; for (i = 1; i < toknum; i++) add_block(token[0], token[i]); skip_to_block = 0; } - // source stanza takes one or more filepaths as parameters + /* source stanza takes one or more filepaths as parameters */ else if (strcmp(token[0], "source") == 0) { int i; char *en_dir; diff --git a/src/settings/plugins/ifupdown/interface_parser.h b/src/settings/plugins/ifupdown/interface_parser.h index 4034d44c..d4bb8515 100644 --- a/src/settings/plugins/ifupdown/interface_parser.h +++ b/src/settings/plugins/ifupdown/interface_parser.h @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager -- Network link manager * * Tom Parker <palfrey@tevp.net> diff --git a/src/settings/plugins/ifupdown/nm-ifupdown-connection.c b/src/settings/plugins/ifupdown/nm-ifupdown-connection.c index 19de1db6..34ecf8b9 100644 --- a/src/settings/plugins/ifupdown/nm-ifupdown-connection.c +++ b/src/settings/plugins/ifupdown/nm-ifupdown-connection.c @@ -1,5 +1,4 @@ -/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ - +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager system settings service (ifupdown) * * Alexander Sack <asac@ubuntu.com> @@ -36,134 +35,46 @@ G_DEFINE_TYPE (NMIfupdownConnection, nm_ifupdown_connection, NM_TYPE_SETTINGS_CONNECTION) -#define NM_IFUPDOWN_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_IFUPDOWN_CONNECTION, NMIfupdownConnectionPrivate)) - -typedef struct { - if_block *ifblock; -} NMIfupdownConnectionPrivate; - -enum { - PROP_ZERO, - PROP_IFBLOCK, - _PROP_END, -}; - - NMIfupdownConnection* nm_ifupdown_connection_new (if_block *block) { - g_return_val_if_fail (block != NULL, NULL); - - return (NMIfupdownConnection *) g_object_new (NM_TYPE_IFUPDOWN_CONNECTION, - NM_IFUPDOWN_CONNECTION_IFBLOCK, block, - NULL); -} - -static gboolean -supports_secrets (NMSettingsConnection *connection, const char *setting_name) -{ - nm_log_info (LOGD_SETTINGS, "supports_secrets() for setting_name: '%s'", setting_name); - - return (strcmp (setting_name, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME) == 0); -} - -static void -nm_ifupdown_connection_init (NMIfupdownConnection *connection) -{ -} - -static GObject * -constructor (GType type, - guint n_construct_params, - GObjectConstructParam *construct_params) -{ GObject *object; - NMIfupdownConnectionPrivate *priv; GError *error = NULL; - object = G_OBJECT_CLASS (nm_ifupdown_connection_parent_class)->constructor (type, n_construct_params, construct_params); - g_return_val_if_fail (object, NULL); + g_return_val_if_fail (block != NULL, NULL); - priv = NM_IFUPDOWN_CONNECTION_GET_PRIVATE (object); - if (!priv) { - nm_log_warn (LOGD_SETTINGS, "%s.%d - no private instance.", __FILE__, __LINE__); - goto err; - } - if (!priv->ifblock) { - nm_log_warn (LOGD_SETTINGS, "(ifupdown) ifblock not provided to constructor."); - goto err; - } + object = g_object_new (NM_TYPE_IFUPDOWN_CONNECTION, NULL); - if (!ifupdown_update_connection_from_if_block (NM_CONNECTION (object), priv->ifblock, &error)) { - nm_log_warn (LOGD_SETTINGS, "%s.%d - invalid connection read from /etc/network/interfaces: (%d) %s", + if (!ifupdown_update_connection_from_if_block (NM_CONNECTION (object), block, &error)) { + nm_log_warn (LOGD_SETTINGS, "%s.%d - invalid connection read from /etc/network/interfaces: %s", __FILE__, __LINE__, - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); - goto err; + error->message); + g_object_unref (object); + return NULL; } - return object; - - err: - g_object_unref (object); - return NULL; + return (NMIfupdownConnection *) object; } -static void -set_property (GObject *object, guint prop_id, - const GValue *value, GParamSpec *pspec) +static gboolean +supports_secrets (NMSettingsConnection *connection, const char *setting_name) { - NMIfupdownConnectionPrivate *priv = NM_IFUPDOWN_CONNECTION_GET_PRIVATE (object); - g_return_if_fail (priv); + nm_log_info (LOGD_SETTINGS, "supports_secrets() for setting_name: '%s'", setting_name); - switch (prop_id) { - case PROP_IFBLOCK: - priv->ifblock = g_value_get_pointer (value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } + return (strcmp (setting_name, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME) == 0); } static void -get_property (GObject *object, guint prop_id, - GValue *value, GParamSpec *pspec) +nm_ifupdown_connection_init (NMIfupdownConnection *connection) { - NMIfupdownConnectionPrivate *priv = NM_IFUPDOWN_CONNECTION_GET_PRIVATE (object); - g_return_if_fail (priv); - - switch (prop_id) { - case PROP_IFBLOCK: - g_value_set_pointer (value, priv->ifblock); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } } static void nm_ifupdown_connection_class_init (NMIfupdownConnectionClass *ifupdown_connection_class) { - GObjectClass *object_class = G_OBJECT_CLASS (ifupdown_connection_class); NMSettingsConnectionClass *connection_class = NM_SETTINGS_CONNECTION_CLASS (ifupdown_connection_class); - g_type_class_add_private (ifupdown_connection_class, sizeof (NMIfupdownConnectionPrivate)); - - /* Virtual methods */ - object_class->constructor = constructor; - object_class->set_property = set_property; - object_class->get_property = get_property; - connection_class->supports_secrets = supports_secrets; - - /* Properties */ - g_object_class_install_property - (object_class, PROP_IFBLOCK, - g_param_spec_pointer (NM_IFUPDOWN_CONNECTION_IFBLOCK, "", "", - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | - G_PARAM_STATIC_STRINGS)); } diff --git a/src/settings/plugins/ifupdown/nm-ifupdown-connection.h b/src/settings/plugins/ifupdown/nm-ifupdown-connection.h index 54c219f4..8085b831 100644 --- a/src/settings/plugins/ifupdown/nm-ifupdown-connection.h +++ b/src/settings/plugins/ifupdown/nm-ifupdown-connection.h @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager system settings service (ifupdown) * @@ -37,8 +37,6 @@ G_BEGIN_DECLS #define NM_IS_IFUPDOWN_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_IFUPDOWN_CONNECTION)) #define NM_IFUPDOWN_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_IFUPDOWN_CONNECTION, NMIfupdownConnectionClass)) -#define NM_IFUPDOWN_CONNECTION_IFBLOCK "ifblock" - typedef struct { NMSettingsConnection parent; } NMIfupdownConnection; diff --git a/src/settings/plugins/ifupdown/parser.c b/src/settings/plugins/ifupdown/parser.c index bd200cd5..109018dd 100644 --- a/src/settings/plugins/ifupdown/parser.c +++ b/src/settings/plugins/ifupdown/parser.c @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager system settings service (ifupdown) * @@ -94,6 +94,8 @@ update_wireless_setting_from_if_block(NMConnection *connection, const gchar* value = ifparser_getkey (block, "inet"); struct _Mapping mapping[] = { {"ssid", "ssid"}, + {"essid", "ssid"}, + {"mode", "mode"}, { NULL, NULL} }; @@ -112,14 +114,22 @@ update_wireless_setting_from_if_block(NMConnection *connection, const gchar* newkey = map_by_mapping(mapping, curr->key+wireless_l); nm_log_info (LOGD_SETTINGS, "wireless setting key: %s='%s'", newkey, curr->data); if(newkey && !strcmp("ssid", newkey)) { - GByteArray *ssid; + GBytes *ssid; gint len = strlen(curr->data); - ssid = g_byte_array_sized_new (len); - g_byte_array_append (ssid, (const guint8 *) curr->data, len); + ssid = g_bytes_new (curr->data, len); g_object_set (wireless_setting, NM_SETTING_WIRELESS_SSID, ssid, NULL); - g_byte_array_free (ssid, TRUE); + g_bytes_unref (ssid); nm_log_info (LOGD_SETTINGS, "setting wireless ssid = %d", len); + } else if(newkey && !strcmp("mode", newkey)) { + if (!g_ascii_strcasecmp (curr->data, "Managed") || !g_ascii_strcasecmp (curr->data, "Auto")) + g_object_set (wireless_setting, NM_SETTING_WIRELESS_MODE, NM_SETTING_WIRELESS_MODE_INFRA, NULL); + else if (!g_ascii_strcasecmp (curr->data, "Ad-Hoc")) + g_object_set (wireless_setting, NM_SETTING_WIRELESS_MODE, NM_SETTING_WIRELESS_MODE_ADHOC, NULL); + else if (!g_ascii_strcasecmp (curr->data, "Master")) + g_object_set (wireless_setting, NM_SETTING_WIRELESS_MODE, NM_SETTING_WIRELESS_MODE_AP, NULL); + else + nm_log_warn (LOGD_SETTINGS, "Invalid mode '%s' (not 'Ad-Hoc', 'Ap', 'Managed', or 'Auto')", curr->data); } else { g_object_set(wireless_setting, newkey, curr->data, @@ -130,13 +140,12 @@ update_wireless_setting_from_if_block(NMConnection *connection, const gchar* newkey = map_by_mapping(mapping, curr->key+wpa_l); if(newkey && !strcmp("ssid", newkey)) { - GByteArray *ssid; + GBytes *ssid; gint len = strlen(curr->data); - ssid = g_byte_array_sized_new (len); - g_byte_array_append (ssid, (const guint8 *) curr->data, len); + ssid = g_bytes_new (curr->data, len); g_object_set (wireless_setting, NM_SETTING_WIRELESS_SSID, ssid, NULL); - g_byte_array_free (ssid, TRUE); + g_bytes_unref (ssid); nm_log_info (LOGD_SETTINGS, "setting wpa ssid = %d", len); } else if(newkey) { @@ -318,11 +327,9 @@ update_wireless_security_setting_from_if_block(NMConnection *connection, IfupdownStrDupeFunc dupe_func = map_by_mapping (dupe_mapping, curr->key+wireless_l); IfupdownStrToTypeFunc type_map_func = map_by_mapping (type_mapping, curr->key+wireless_l); GFreeFunc free_func = map_by_mapping (free_type_mapping, curr->key+wireless_l); - if(!newkey || !dupe_func) { - nm_log_warn (LOGD_SETTINGS, "no (wireless) mapping found for key: %s", - curr->key); + if(!newkey || !dupe_func) goto next; - } + property_value = (*dupe_func) (curr->data, connection); nm_log_info (LOGD_SETTINGS, "setting wireless security key: %s=%s", newkey, property_value); @@ -353,15 +360,15 @@ update_wireless_security_setting_from_if_block(NMConnection *connection, IfupdownStrDupeFunc dupe_func = map_by_mapping (dupe_mapping, curr->key+wpa_l); IfupdownStrToTypeFunc type_map_func = map_by_mapping (type_mapping, curr->key+wpa_l); GFreeFunc free_func = map_by_mapping (free_type_mapping, curr->key+wpa_l); - if(!newkey || !dupe_func) { + if(!newkey || !dupe_func) goto next; - } + property_value = (*dupe_func) (curr->data, connection); nm_log_info (LOGD_SETTINGS, "setting wpa security key: %s=%s", newkey, #ifdef DEBUG_SECRETS property_value -#else // DEBUG_SECRETS +#else /* DEBUG_SECRETS */ !strcmp("key", newkey) || !strcmp("leap-password", newkey) || !strcmp("pin", newkey) || @@ -372,7 +379,7 @@ update_wireless_security_setting_from_if_block(NMConnection *connection, !strcmp("wep-key3", newkey) || NULL ? "<omitted>" : property_value -#endif // DEBUG_SECRETS +#endif /* DEBUG_SECRETS */ ); if (type_map_func) { diff --git a/src/settings/plugins/ifupdown/parser.h b/src/settings/plugins/ifupdown/parser.h index 6aebb8c7..ee88c500 100644 --- a/src/settings/plugins/ifupdown/parser.h +++ b/src/settings/plugins/ifupdown/parser.h @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager system settings service (ifupdown) * diff --git a/src/settings/plugins/ifupdown/plugin.c b/src/settings/plugins/ifupdown/plugin.c index dbc96eac..b506b2d6 100644 --- a/src/settings/plugins/ifupdown/plugin.c +++ b/src/settings/plugins/ifupdown/plugin.c @@ -93,13 +93,13 @@ static void settings_plugin_ifupdown_class_init (SettingsPluginIfupdownClass *req_class); static void -SettingsPluginIfupdown_init (NMSettingsPlugin *config); +init (NMSettingsPlugin *config); /* Returns the plugins currently known list of connections. The returned * list is freed by the system settings service. */ static GSList* -SettingsPluginIfupdown_get_connections (NMSettingsPlugin *config); +get_connections (NMSettingsPlugin *config); /* * Return a list of device specifications which NetworkManager should not @@ -107,27 +107,27 @@ SettingsPluginIfupdown_get_connections (NMSettingsPlugin *config); * each element must be allocated using g_malloc() or its variants. */ static GSList* -SettingsPluginIfupdown_get_unmanaged_specs (NMSettingsPlugin *config); +get_unmanaged_specs (NMSettingsPlugin *config); /* GObject */ static void -GObject__get_property (GObject *object, guint prop_id, +get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void -GObject__set_property (GObject *object, guint prop_id, +set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void -GObject__dispose (GObject *object); +dispose (GObject *object); static void settings_plugin_interface_init (NMSettingsPluginInterface *plugin_iface) { - plugin_iface->init = SettingsPluginIfupdown_init; - plugin_iface->get_connections = SettingsPluginIfupdown_get_connections; - plugin_iface->get_unmanaged_specs = SettingsPluginIfupdown_get_unmanaged_specs; + plugin_iface->init = init; + plugin_iface->get_connections = get_connections; + plugin_iface->get_unmanaged_specs = get_unmanaged_specs; } static void @@ -137,9 +137,9 @@ settings_plugin_ifupdown_class_init (SettingsPluginIfupdownClass *req_class) g_type_class_add_private (req_class, sizeof (SettingsPluginIfupdownPrivate)); - object_class->dispose = GObject__dispose; - object_class->get_property = GObject__get_property; - object_class->set_property = GObject__set_property; + object_class->dispose = dispose; + object_class->get_property = get_property; + object_class->set_property = set_property; g_object_class_override_property (object_class, NM_SETTINGS_PLUGIN_PROP_NAME, @@ -292,7 +292,7 @@ handle_uevent (GUdevClient *client, } static void -SettingsPluginIfupdown_init (NMSettingsPlugin *config) +init (NMSettingsPlugin *config) { SettingsPluginIfupdown *self = SETTINGS_PLUGIN_IFUPDOWN (config); SettingsPluginIfupdownPrivate *priv = SETTINGS_PLUGIN_IFUPDOWN_GET_PRIVATE (self); @@ -447,7 +447,7 @@ SettingsPluginIfupdown_init (NMSettingsPlugin *config) * list is freed by the system settings service. */ static GSList* -SettingsPluginIfupdown_get_connections (NMSettingsPlugin *config) +get_connections (NMSettingsPlugin *config) { SettingsPluginIfupdownPrivate *priv = SETTINGS_PLUGIN_IFUPDOWN_GET_PRIVATE (config); GSList *connections; @@ -471,7 +471,7 @@ SettingsPluginIfupdown_get_connections (NMSettingsPlugin *config) * each element must be allocated using g_malloc() or its variants. */ static GSList* -SettingsPluginIfupdown_get_unmanaged_specs (NMSettingsPlugin *config) +get_unmanaged_specs (NMSettingsPlugin *config) { SettingsPluginIfupdownPrivate *priv = SETTINGS_PLUGIN_IFUPDOWN_GET_PRIVATE (config); GSList *specs = NULL; @@ -504,7 +504,7 @@ settings_plugin_ifupdown_init (SettingsPluginIfupdown *plugin) } static void -GObject__get_property (GObject *object, guint prop_id, +get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { switch (prop_id) { @@ -524,7 +524,7 @@ GObject__get_property (GObject *object, guint prop_id, } static void -GObject__set_property (GObject *object, guint prop_id, +set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { switch (prop_id) { @@ -535,7 +535,7 @@ GObject__set_property (GObject *object, guint prop_id, } static void -GObject__dispose (GObject *object) +dispose (GObject *object) { SettingsPluginIfupdown *plugin = SETTINGS_PLUGIN_IFUPDOWN (object); SettingsPluginIfupdownPrivate *priv = SETTINGS_PLUGIN_IFUPDOWN_GET_PRIVATE (plugin); diff --git a/src/settings/plugins/ifupdown/plugin.h b/src/settings/plugins/ifupdown/plugin.h index 090178f2..10ba2287 100644 --- a/src/settings/plugins/ifupdown/plugin.h +++ b/src/settings/plugins/ifupdown/plugin.h @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager system settings service (ifupdown) * |