+/* list of devices that we should run last due to any one of a number of reasons */
+static char *last_list[] = {
+ "/block/dm", /* on here because dm wants to have the block devices around before it */
+ NULL,
+};
+
+static void exec_list(struct list_head *device_list)
+{
+ struct device *loop_device;
+ struct device *tmp_device;
+
+ /* handle the devices we are allowed to, excluding the "last" type devices */
+ list_for_each_entry_safe(loop_device, tmp_device, device_list, list) {
+ int found = 0;
+ int i;
+ for (i=0; last_list[i] != NULL; i++) {
+ if (strncmp(loop_device->path, last_list[i], strlen(last_list[i])) == 0) {
+ found = 1;
+ break;
+ }
+ }
+ if (found)
+ continue;
+
+ udev_exec(loop_device->path, loop_device->subsys);
+ list_del(&loop_device->list);
+ free(loop_device);
+ }
+
+ /* handle the rest of the devices left over, if any */
+ list_for_each_entry_safe(loop_device, tmp_device, device_list, list) {
+ udev_exec(loop_device->path, loop_device->subsys);
+ list_del(&loop_device->list);
+ free(loop_device);
+ }
+}
+
+static void udev_scan_block(void)