chiark / gitweb /
add IEEE1394 rules to the gentoo rule file
[elogind.git] / udev_db.c
index afbd50e50fc00fdfb9fa1948a209f0d8ec2893b4..264af79d063c49500753913028df3f352323c3ed 100644 (file)
--- a/udev_db.c
+++ b/udev_db.c
@@ -86,7 +86,8 @@ int udev_db_add_device(struct udevice *udev)
        fprintf(f, "M:%u:%u\n", major(udev->devt), minor(udev->devt));
        fprintf(f, "A:%u\n", udev->partitions);
        fprintf(f, "R:%u\n", udev->ignore_remove);
-
+       list_for_each_entry(name_loop, &udev->env_list, node)
+               fprintf(f, "E:%s\n", name_loop->name);
        fclose(f);
 
        return 0;
@@ -149,6 +150,12 @@ static int parse_db_file(struct udevice *udev, const char *filename)
                        strlcpy(line, &bufline[2], count-1);
                        udev->ignore_remove = atoi(line);
                        break;
+               case 'E':
+                       if (count > sizeof(line))
+                               count =  sizeof(line);
+                       strlcpy(line, &bufline[2], count-1);
+                       name_list_add(&udev->env_list, line, 0);
+                       break;
                }
        }
        file_unmap(buf, bufsize);