]> err.no Git - systemd/commitdiff
udevinfo: export all information stored in database
authorKay Sievers <kay.sievers@vrfy.org>
Fri, 6 Apr 2007 17:50:19 +0000 (19:50 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Fri, 6 Apr 2007 17:50:19 +0000 (19:50 +0200)
udev_db.c
udev_rules.c
udevinfo.c

index 7b8d02bf81f895eba55c702a837a4e8f21c7da81..abc1e5ad5a98b80948cbdb7cd3c95b2ac37d1108 100644 (file)
--- a/udev_db.c
+++ b/udev_db.c
@@ -157,9 +157,9 @@ 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)
+               if (udev->link_priority != 0)
                        fprintf(f, "L:%u\n", udev->link_priority);
-               if (udev->partitions)
+               if (udev->partitions != 0)
                        fprintf(f, "A:%u\n", udev->partitions);
                if (udev->ignore_remove)
                        fprintf(f, "R:%u\n", udev->ignore_remove);
index d77d5ec19691c4c664c2cb1ddb3314352f76a67c..6bd28ad4b7981a5ee136d38c6a80cd666b416fa6 100644 (file)
@@ -914,7 +914,7 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev)
                                udev->ignore_remove = 1;
                                dbg("remove event should be ignored");
                        }
-                       if (rule->link_priority) {
+                       if (rule->link_priority != 0) {
                                udev->link_priority = rule->link_priority;
                                info("link_priority=%i", udev->link_priority);
                        }
index 4b4876cc11f10e03cad5efb5555da04dc382d116..f36f240f0a710971723a453b927d4ae9f4ae568d 100644 (file)
@@ -144,9 +144,14 @@ static void print_record(struct udevice *udev)
 
        printf("P: %s\n", udev->dev->devpath);
        printf("N: %s\n", udev->name);
-       printf("L: %i\n", udev->link_priority);
        list_for_each_entry(name_loop, &udev->symlink_list, node)
                printf("S: %s\n", name_loop->name);
+       if (udev->link_priority != 0)
+               printf("L: %i\n", udev->link_priority);
+       if (udev->partitions != 0)
+               printf("A:%u\n", udev->partitions);
+       if (udev->ignore_remove)
+               printf("R:%u\n", udev->ignore_remove);
        list_for_each_entry(name_loop, &udev->env_list, node)
                printf("E: %s\n", name_loop->name);
 }