summaryrefslogtreecommitdiff
path: root/src/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c48
1 files changed, 9 insertions, 39 deletions
diff --git a/src/device.c b/src/device.c
index c0683abd..a563f464 100644
--- a/src/device.c
+++ b/src/device.c
@@ -53,7 +53,6 @@ struct connman_device {
*/
bool powered;
bool scanning;
- bool disconnected;
char *name;
char *node;
char *address;
@@ -385,6 +384,9 @@ static void device_destruct(struct connman_device *device)
clear_pending_trigger(device);
+ g_hash_table_destroy(device->networks);
+ device->networks = NULL;
+
g_free(device->ident);
g_free(device->node);
g_free(device->name);
@@ -394,9 +396,6 @@ static void device_destruct(struct connman_device *device)
g_free(device->last_network);
- g_hash_table_destroy(device->networks);
- device->networks = NULL;
-
g_free(device);
}
@@ -568,7 +567,7 @@ int connman_device_set_powered(struct connman_device *device,
{
enum connman_service_type type;
- DBG("driver %p powered %d", device, powered);
+ DBG("device %p powered %d", device, powered);
if (device->powered == powered)
return -EALREADY;
@@ -588,7 +587,6 @@ int connman_device_set_powered(struct connman_device *device,
__connman_technology_enabled(type);
- connman_device_set_disconnected(device, false);
device->scanning = false;
if (device->driver && device->driver->scan)
@@ -623,8 +621,6 @@ int __connman_device_disconnect(struct connman_device *device)
DBG("device %p", device);
- connman_device_set_disconnected(device, true);
-
g_hash_table_iter_init(&iter, device->networks);
while (g_hash_table_iter_next(&iter, &key, &value)) {
@@ -751,37 +747,6 @@ int connman_device_set_scanning(struct connman_device *device,
}
/**
- * connman_device_set_disconnected:
- * @device: device structure
- * @disconnected: disconnected state
- *
- * Change disconnected state of device (only for device with networks)
- */
-int connman_device_set_disconnected(struct connman_device *device,
- bool disconnected)
-{
- DBG("device %p disconnected %d", device, disconnected);
-
- if (device->disconnected == disconnected)
- return -EALREADY;
-
- device->disconnected = disconnected;
-
- return 0;
-}
-
-/**
- * connman_device_get_disconnected:
- * @device: device structure
- *
- * Get device disconnected state
- */
-bool connman_device_get_disconnected(struct connman_device *device)
-{
- return device->disconnected;
-}
-
-/**
* connman_device_set_string:
* @device: device structure
* @key: unique identifier
@@ -1352,6 +1317,11 @@ nodevice:
}
list:
+ if (__connman_inet_isrootnfs_device(devname)) {
+ DBG("ignoring device %s (rootnfs)", devname);
+ return true;
+ }
+
blacklisted_interfaces =
connman_setting_get_string_list("NetworkInterfaceBlacklist");
if (!blacklisted_interfaces)