udev-hwdb: Prevent devices from being listed twice

The change to print a warning (for testing purposes) from commit
944e0d0383 (udev-rules: Print warning if an ID is supported) was
incorrect because it prevented duplicated to be suppressed if a device
is listed by two independent drivers.
This commit is contained in:
Benjamin Berg 2021-01-20 18:02:31 +01:00
parent 284f6f1ef8
commit 66fc93eeff

View file

@ -136,10 +136,11 @@ 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 (cls == &whitelist && g_hash_table_lookup (printed, key) != NULL) if (g_hash_table_lookup (printed, key) != NULL)
{ {
g_warning ("%s implemented by driver %s", if (cls == &whitelist)
key, (const char *) g_hash_table_lookup (printed, key)); g_warning ("%s implemented by driver %s",
key, (const char *) g_hash_table_lookup (printed, key));
g_free (key); g_free (key);
continue; continue;
} }