summaryrefslogtreecommitdiff
path: root/src/nm-manager.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2014-02-12 05:22:57 -0600
committerDan Williams <dcbw@redhat.com>2014-03-03 09:32:41 -0600
commit71a52347f32d0436c58d4c77eea703011d4157dc (patch)
tree4a552f8e529fe11f16a24c8530c251af732fd471 /src/nm-manager.c
parent2a04df856b0cffd7c8c3db27c48a018f3dc0cf69 (diff)
downloadNetworkManager-71a52347f32d0436c58d4c77eea703011d4157dc.tar.gz
atm: make ADSL support a plugin
Make ADSL support a plugin using the new device factory interface. Provides a 1% size reduction in the core NM binary. Before After NM: 1265336 1253016 (-1%) ATM: 0 27360 (all results from stripped files)
Diffstat (limited to 'src/nm-manager.c')
-rw-r--r--src/nm-manager.c73
1 files changed, 0 insertions, 73 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c
index 22e8a32f57..fa76575cf0 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -51,7 +51,6 @@
#include "nm-device-team.h"
#include "nm-device-bridge.h"
#include "nm-device-vlan.h"
-#include "nm-device-adsl.h"
#include "nm-device-generic.h"
#include "nm-device-veth.h"
#include "nm-device-tun.h"
@@ -63,7 +62,6 @@
#include "nm-setting-vpn.h"
#include "nm-dbus-glib-types.h"
#include "nm-platform.h"
-#include "nm-atm-manager.h"
#include "nm-rfkill-manager.h"
#include "nm-hostname-provider.h"
#include "nm-bluez-manager.h"
@@ -165,7 +163,6 @@ static NMActiveConnection *_new_active_connection (NMManager *self,
static void policy_activating_device_changed (GObject *object, GParamSpec *pspec, gpointer user_data);
static NMDevice *find_device_by_ip_iface (NMManager *self, const gchar *iface);
-static NMDevice *find_device_by_iface (NMManager *self, const gchar *iface);
static void rfkill_change_wifi (const char *desc, gboolean enabled);
@@ -219,7 +216,6 @@ typedef struct {
NMDBusManager *dbus_mgr;
gboolean prop_filter_added;
- NMAtmManager *atm_mgr;
NMRfkillManager *rfkill_mgr;
NMBluezManager *bluez_mgr;
@@ -2027,21 +2023,6 @@ find_device_by_ip_iface (NMManager *self, const gchar *iface)
}
static NMDevice *
-find_device_by_iface (NMManager *self, const gchar *iface)
-{
- NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
- GSList *iter;
-
- for (iter = priv->devices; iter; iter = g_slist_next (iter)) {
- NMDevice *candidate = iter->data;
-
- if (g_strcmp0 (nm_device_get_iface (candidate), iface) == 0)
- return candidate;
- }
- return NULL;
-}
-
-static NMDevice *
find_device_by_ifindex (NMManager *self, guint32 ifindex)
{
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
@@ -2317,49 +2298,6 @@ platform_link_removed_cb (NMPlatform *platform,
}
static void
-atm_device_added_cb (NMAtmManager *atm_mgr,
- const char *iface,
- const char *sysfs_path,
- const char *driver,
- gpointer user_data)
-{
- NMManager *self = NM_MANAGER (user_data);
- NMDevice *device;
-
- g_return_if_fail (iface != NULL);
- g_return_if_fail (sysfs_path != NULL);
-
- device = find_device_by_iface (self, iface);
- if (device)
- return;
-
- device = nm_device_adsl_new (sysfs_path, iface, driver);
- if (device)
- add_device (self, device, TRUE);
-}
-
-static void
-atm_device_removed_cb (NMAtmManager *manager,
- const char *iface,
- gpointer user_data)
-{
- NMManager *self = NM_MANAGER (user_data);
- NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
- NMDevice *device = NULL;
- GSList *iter;
-
- for (iter = priv->devices; iter; iter = g_slist_next (iter)) {
- if (g_strcmp0 (nm_device_get_iface (NM_DEVICE (iter->data)), iface) == 0) {
- device = iter->data;
- break;
- }
- }
-
- if (device)
- remove_device (self, device, FALSE);
-}
-
-static void
rfkill_manager_rfkill_changed_cb (NMRfkillManager *rfkill_mgr,
RfKillType rtype,
RfKillState udev_state,
@@ -4230,7 +4168,6 @@ nm_manager_start (NMManager *self)
system_hostname_changed_cb (priv->settings, NULL, self);
nm_platform_query_devices ();
- nm_atm_manager_query_devices (priv->atm_mgr);
nm_bluez_manager_query_devices (priv->bluez_mgr);
/*
@@ -4789,16 +4726,6 @@ nm_manager_new (NMSettings *settings,
G_CALLBACK (platform_link_removed_cb),
singleton);
- priv->atm_mgr = nm_atm_manager_new ();
- g_signal_connect (priv->atm_mgr,
- "device-added",
- G_CALLBACK (atm_device_added_cb),
- singleton);
- g_signal_connect (priv->atm_mgr,
- "device-removed",
- G_CALLBACK (atm_device_removed_cb),
- singleton);
-
priv->rfkill_mgr = nm_rfkill_manager_new ();
g_signal_connect (priv->rfkill_mgr,
"rfkill-changed",