- udev_list_entry_foreach(entry, udev_hwdb_get_properties_list_entry(hwdb, modalias, 0)) {
+ if (!hwdb)
+ return -ENOENT;
+
+ if (prefix) {
+ _cleanup_free_ const char *lookup;
+
+ lookup = strjoin(prefix, modalias, NULL);
+ if (!lookup)
+ return -ENOMEM;
+ list = udev_hwdb_get_properties_list_entry(hwdb, lookup, 0);
+ } else
+ list = udev_hwdb_get_properties_list_entry(hwdb, modalias, 0);
+
+ udev_list_entry_foreach(entry, list) {
+ if (filter && fnmatch(filter, udev_list_entry_get_name(entry), FNM_NOESCAPE) != 0)
+ continue;
+