Compare commits

...

1 commit

Author SHA1 Message Date
Benjamin Berg
78e8cf2a40 FIXME: Add random debug output 2021-08-26 17:23:57 +02:00

View file

@ -473,6 +473,7 @@ fp_context_enumerate (FpContext *context)
#ifdef HAVE_UDEV #ifdef HAVE_UDEV
g_debug ("probing via udev");
{ {
g_autoptr(GUdevClient) udev_client = g_udev_client_new (NULL); g_autoptr(GUdevClient) udev_client = g_udev_client_new (NULL);
@ -484,6 +485,8 @@ fp_context_enumerate (FpContext *context)
g_autoptr(GList) spidev_devices = g_udev_client_query_by_subsystem (udev_client, "spidev"); g_autoptr(GList) spidev_devices = g_udev_client_query_by_subsystem (udev_client, "spidev");
g_autoptr(GList) hidraw_devices = g_udev_client_query_by_subsystem (udev_client, "hidraw"); g_autoptr(GList) hidraw_devices = g_udev_client_query_by_subsystem (udev_client, "hidraw");
g_debug ("probing via udev: got devices");
/* for each potential driver, try to match all requested resources. */ /* for each potential driver, try to match all requested resources. */
for (i = 0; i < priv->drivers->len; i++) for (i = 0; i < priv->drivers->len; i++)
{ {
@ -534,6 +537,7 @@ fp_context_enumerate (FpContext *context)
if (matched_hidraw == NULL) if (matched_hidraw == NULL)
continue; continue;
} }
g_debug ("probing via udev: found a device");
priv->pending_devices++; priv->pending_devices++;
g_async_initable_new_async (driver, g_async_initable_new_async (driver,
G_PRIORITY_LOW, G_PRIORITY_LOW,
@ -562,10 +566,15 @@ fp_context_enumerate (FpContext *context)
g_list_foreach (spidev_devices, (GFunc) g_object_unref, NULL); g_list_foreach (spidev_devices, (GFunc) g_object_unref, NULL);
g_list_foreach (hidraw_devices, (GFunc) g_object_unref, NULL); g_list_foreach (hidraw_devices, (GFunc) g_object_unref, NULL);
} }
g_debug ("probing via udev: done");
#endif #endif
while (priv->pending_devices) g_debug("enumeration done, pending devices: %d", priv->pending_devices);
while (priv->pending_devices) {
g_debug("pending devices: %d", priv->pending_devices);
g_main_context_iteration (NULL, TRUE); g_main_context_iteration (NULL, TRUE);
}
} }
/** /**