- /* parent reads from fds[0] */
- close(fds[1]);
- retval = 0;
- while (1) {
- res = read(fds[0], buffer, sizeof(buffer) - 1);
- if (res <= 0)
+ wait(NULL);
+ }
+}
+
+/* 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;