From 342a5bbd1a7f3ecf67d1bd7dd8c80a1cd50727e7 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 29 Jul 2011 14:55:56 +0200 Subject: udev: Add extra debug statements for device actions --- plugins/udev.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'plugins') diff --git a/plugins/udev.c b/plugins/udev.c index abd08614..ed999985 100644 --- a/plugins/udev.c +++ b/plugins/udev.c @@ -828,6 +828,8 @@ static gboolean devpath_remove(gpointer key, gpointer value, gpointer user_data) const char *path = value; const char *devpath = user_data; + DBG("%s -> %s", path, devpath); + return g_str_equal(path, devpath); } @@ -854,6 +856,8 @@ static void remove_modem(struct udev_device *udev_device) ofono_modem_remove(modem); + DBG("%s", devpath); + remove = g_strdup(devpath); g_hash_table_foreach_remove(devpath_list, devpath_remove, remove); @@ -929,6 +933,8 @@ static gboolean udev_event(GIOChannel *channel, GIOCondition cond, if (action == NULL) goto done; + DBG("subsystem %s %s", subsystem, action); + if (g_str_equal(action, "add") == TRUE) { if (g_strcmp0(subsystem, "tty") == 0 || g_strcmp0(subsystem, "net") == 0 || @@ -941,6 +947,8 @@ static gboolean udev_event(GIOChannel *channel, GIOCondition cond, remove_modem(device); } + DBG("subsystem %s finished", subsystem); + done: udev_device_unref(device); -- cgit v1.2.3