diff --git a/src/nm-manager.c b/src/nm-manager.c index 4950c98f86..0c1201cee2 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -1977,6 +1977,21 @@ platform_link_cb (NMPlatform *platform, } } +static void +platform_query_devices (NMManager *self) +{ + GArray *links_array; + NMPlatformLink *links; + int i; + + links_array = nm_platform_link_get_all (NM_PLATFORM_GET); + links = (NMPlatformLink *) links_array->data; + for (i = 0; i < links_array->len; i++) + platform_link_added (self, links[i].ifindex, &links[i], NM_PLATFORM_REASON_INTERNAL); + + g_array_unref (links_array); +} + static void rfkill_manager_rfkill_changed_cb (NMRfkillManager *rfkill_mgr, RfKillType rtype, @@ -4113,7 +4128,7 @@ nm_manager_start (NMManager *self) /* Start device factories */ nm_device_factory_manager_for_each_factory (start_factory, NULL); - nm_platform_query_devices (NM_PLATFORM_GET); + platform_query_devices (self); /* * Connections added before the manager is started do not emit diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index 97e0295fc2..79e83b6aef 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -383,32 +383,6 @@ nm_platform_sysctl_get_int_checked (NMPlatform *self, const char *path, guint ba /******************************************************************/ -/** - * nm_platform_query_devices: - * self: platform instance - * - * Emit #NMPlatform:link-changed ADDED signals for all currently-known links. - * Should only be called at startup. - */ -void -nm_platform_query_devices (NMPlatform *self) -{ - GArray *links_array; - NMPlatformLink *links; - int i; - - _CHECK_SELF_VOID (self, klass); - - links_array = nm_platform_link_get_all (self); - links = (NMPlatformLink *) links_array->data; - for (i = 0; i < links_array->len; i++) { - g_signal_emit (self, signals[SIGNAL_LINK_CHANGED], 0, - links[i].ifindex, &links[i], NM_PLATFORM_SIGNAL_ADDED, - NM_PLATFORM_REASON_INTERNAL); - } - g_array_unref (links_array); -} - /** * nm_platform_link_get_all: * self: platform instance diff --git a/src/platform/nm-platform.h b/src/platform/nm-platform.h index e9184a0148..5b42968733 100644 --- a/src/platform/nm-platform.h +++ b/src/platform/nm-platform.h @@ -532,8 +532,6 @@ void nm_platform_set_error (NMPlatform *self, NMPlatformError error); NMPlatformError nm_platform_get_error (NMPlatform *self); const char *nm_platform_get_error_msg (NMPlatform *self); -void nm_platform_query_devices (NMPlatform *self); - gboolean nm_platform_sysctl_set (NMPlatform *self, const char *path, const char *value); char *nm_platform_sysctl_get (NMPlatform *self, const char *path); gint32 nm_platform_sysctl_get_int32 (NMPlatform *self, const char *path, gint32 fallback);