aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2018-09-15 19:54:16 +0200
committerAlexander Couzens <lynxis@fe80.eu>2018-09-15 22:19:25 +0200
commit45eddec130b809513a807d7ce5b16edccb606e1d (patch)
treedb5cff7c953fb0615714637cf06e7bde4f4f0345
parentb494ae129db0cafe64d5850b1378e60a9e6983d3 (diff)
downloadofono-45eddec130b809513a807d7ce5b16edccb606e1d.tar.gz
ofono-45eddec130b809513a807d7ce5b16edccb606e1d.tar.bz2
ofono-45eddec130b809513a807d7ce5b16edccb606e1d.tar.xz
ofono-45eddec130b809513a807d7ce5b16edccb606e1d.zip
NOT-FOR-MERGE: ignore disconnecting network interfaceosmo-gsm-tester-1.23
when moving a wwanX interface to a lxc container ofono gets "remove" event. Ignoring the "remove" events allow this to work without ofono is removing the whole modem
-rw-r--r--plugins/udevng.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/udevng.c b/plugins/udevng.c
index 3c7d99e7..348b198a 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -1317,6 +1317,11 @@ static gboolean check_remove(gpointer key, gpointer value, gpointer user_data)
for (list = modem->devices; list; list = list->next) {
struct device_info *info = list->data;
+ /* ignore net subsystem to allow the device to be given into
+ * an lxc container */
+ if (g_strcmp0(info->subsystem, "net") == 0)
+ continue;
+
if (g_strcmp0(info->devpath, devpath) == 0)
return TRUE;
}