- /* find the separator */
- sep = memchr(buf, '=', param_len);
- if (!sep)
- continue;
+ list = udev_device_get_properties_list_entry(udev);
+ if (!list)
+ return;
+
+ udev_list_entry_foreach(entry, list)
+ discover_device_set_param(dev,
+ udev_list_entry_get_name(entry),
+ udev_list_entry_get_value(entry));
+}
+
+static int udev_handle_block_add(struct pb_udev *udev, struct udev_device *dev,
+ const char *name)
+{
+ struct discover_device *ddev;
+ const char *typestr;
+ const char *uuid;
+ const char *path;
+ const char *node;
+ const char *prop;
+ bool cdrom;
+
+ typestr = udev_device_get_devtype(dev);
+ if (!typestr) {
+ pb_debug("udev_device_get_devtype failed\n");
+ return -1;
+ }
+
+ if (!(!strcmp(typestr, "disk") || !strcmp(typestr, "partition"))) {
+ pb_debug("SKIP %s: invalid type %s\n", name, typestr);
+ return 0;
+ }
+
+ node = udev_device_get_devnode(dev);
+ path = udev_device_get_devpath(dev);
+ if (path && (strstr(path, "virtual/block/loop")
+ || strstr(path, "virtual/block/ram"))) {
+ pb_debug("SKIP: %s: ignored (path=%s)\n", name, path);
+ return 0;
+ }