- while ((entry = readdir(directory))) {
- if (entry->d_name[0] == '\0')
- break;
- /* Don't run the files '.', '..', or hidden files,
- * or files that start with a '#' */
- if ((entry->d_name[0] == '.') ||
- (entry->d_name[0] == COMMENT_PREFIX))
- continue;
-
- /* Nor do we run files that do not end in ".dev" */
- name_len = strlen(entry->d_name);
- if (name_len < strlen(SUFFIX))
- continue;
- if (strcmp(&entry->d_name[name_len - sizeof (SUFFIX) + 1], SUFFIX) != 0)
- continue;
-
- /* FIXME - need to use file_list_insert() here to run these in sorted order... */
- snprintf(filename, sizeof(filename), "%s%s", dirname, entry->d_name);
- filename[sizeof(filename)-1] = '\0';
- run_program(filename);
+ if (dev->type == 'b' || dev->type == 'c') {
+ strfieldcpy(devname, udev_root);
+ strfieldcat(devname, dev->name);
+ } else if (dev->type == 'n') {
+ strfieldcpy(devname, dev->name);
+ setenv("DEVPATH", devpath, 1);