mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
udev-rules: Print warning if an ID is supported
This commit is contained in:
@@ -110,6 +110,7 @@ static const FpIdEntry blacklist_id_table[] = {
|
|||||||
static const FpDeviceClass whitelist = {
|
static const FpDeviceClass whitelist = {
|
||||||
.type = FP_DEVICE_TYPE_USB,
|
.type = FP_DEVICE_TYPE_USB,
|
||||||
.id_table = whitelist_id_table,
|
.id_table = whitelist_id_table,
|
||||||
|
.id = "whitelist",
|
||||||
.full_name = "Hardcoded whitelist"
|
.full_name = "Hardcoded whitelist"
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -138,13 +139,15 @@ print_driver (const FpDeviceClass *cls)
|
|||||||
|
|
||||||
key = g_strdup_printf ("%04x:%04x", entry->vid, entry->pid);
|
key = g_strdup_printf ("%04x:%04x", entry->vid, entry->pid);
|
||||||
|
|
||||||
if (g_hash_table_lookup (printed, key) != NULL)
|
if (cls == &whitelist && g_hash_table_lookup (printed, key) != NULL)
|
||||||
{
|
{
|
||||||
|
g_warning ("%s implemented by driver %s",
|
||||||
|
key, (const char *) g_hash_table_lookup (printed, key));
|
||||||
g_free (key);
|
g_free (key);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_hash_table_insert (printed, key, GINT_TO_POINTER (1));
|
g_hash_table_insert (printed, key, (void *) cls->id);
|
||||||
|
|
||||||
if (num_printed == 0)
|
if (num_printed == 0)
|
||||||
g_print ("# %s\n", cls->full_name);
|
g_print ("# %s\n", cls->full_name);
|
||||||
|
|||||||
Reference in New Issue
Block a user