- /* we may also see multipath devices; same dev nodes (hence id), but
- * different serial numbers */
- serial = udev_device_get_property_value(dev, "ID_SERIAL");
- if (serial && device_lookup_by_serial(udev->handler, serial))
- return -1;
+ type = udev_device_get_property_value(dev, "ID_FS_TYPE");
+ if (!type) {
+ pb_log("SKIP: %s: no ID_FS_TYPE property\n", name);
+ return 0;
+ }
+
+ while (ignored_types[i]) {
+ if (!strncmp(type, ignored_types[i], strlen(ignored_types[i]))) {
+ pb_log("SKIP: %s: ignore '%s' filesystem\n", name, type);
+ return 0;
+ }
+ i++;
+ }
+
+ /* We may see multipath devices; they'll have the same uuid as an
+ * existing device, so only parse the first. */
+ uuid = udev_device_get_property_value(dev, "ID_FS_UUID");
+ if (uuid) {
+ ddev = device_lookup_by_uuid(udev->handler, uuid);
+ if (ddev) {
+ pb_log("SKIP: %s UUID [%s] already present (as %s)\n",
+ name, uuid, ddev->device->id);
+ return 0;
+ }
+ }