chiark / gitweb /
udevtest: print message before log output
[elogind.git] / udevinfo.c
index 4b4876cc11f10e03cad5efb5555da04dc382d116..cda229244d9b59aadaea86d55fca32d098271016 100644 (file)
@@ -93,7 +93,7 @@ static void print_all_attributes(const char *devpath, const char *key)
                                continue;
                        }
 
-                       replace_untrusted_chars(value);
+                       replace_chars(value, ALLOWED_CHARS_INPUT);
                        printf("    %s{%s}==\"%s\"\n", key, dent->d_name, value);
                }
        }
@@ -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);
 }