diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2007-03-16 15:16:08 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2007-03-16 15:16:08 +0100 |
commit | 2dbb47f8606d18b14e981fb5cf245e8aaaad2de1 (patch) | |
tree | 7935d01e23f4f5b7305292a98685f491d75549ab /udev_db.c | |
parent | fc6da921ad3bcb251aa317376e81701700e925c9 (diff) |
add link_priority to rule options, and store it in database
Diffstat (limited to 'udev_db.c')
-rw-r--r-- | udev_db.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -118,6 +118,8 @@ int udev_db_add_device(struct udevice *udev) name_index(udev->dev->devpath, name_loop->name, 1); } fprintf(f, "M:%u:%u\n", major(udev->devt), minor(udev->devt)); + if (udev->link_priority) + fprintf(f, "L:%u\n", udev->link_priority); if (udev->partitions) fprintf(f, "A:%u\n", udev->partitions); if (udev->ignore_remove) @@ -198,6 +200,13 @@ int udev_db_get_device(struct udevice *udev, const char *devpath) line[count-2] = '\0'; name_list_add(&udev->symlink_list, line, 0); break; + case 'L': + if (count > sizeof(line)) + count = sizeof(line); + memcpy(line, &bufline[2], count-2); + line[count-2] = '\0'; + udev->link_priority = atoi(line); + break; case 'A': if (count > sizeof(line)) count = sizeof(line); |