]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udevadm: do not explicitly set white color
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 13 Feb 2026 05:31:54 +0000 (14:31 +0900)
committerMike Yuan <me@yhndnzj.com>
Fri, 13 Feb 2026 15:37:16 +0000 (16:37 +0100)
Otherwise, output on black-on-white terminals is not visible.

Follow-up for 13005c8f2c7f0169728fef804f164c3574b8e0f7.
Fixes #40629.

src/udev/udevadm-info.c

index 6db63a1693c90b913f01b773c51efbccea73e97b..1598d8a3210bf9eb2a7da26c5ee1c3e6af87b44d 100644 (file)
@@ -346,7 +346,7 @@ static int print_record(sd_device *device, const char *prefix) {
          *
          * Coloring: let's be conservative with coloring. Let's use it to group related fields. Right now:
          *
-         *     • white for fields that give the device a name
+         *     • highlight fields that give the device a name
          *     • green for fields that categorize the device into subsystem/devtype and similar
          *     • cyan for fields about associated device nodes/symlinks/network interfaces and such
          *     • magenta for block device diskseq
@@ -354,16 +354,16 @@ static int print_record(sd_device *device, const char *prefix) {
          *     • no color for regular properties */
 
         assert_se(sd_device_get_devpath(device, &str) >= 0);
-        printf("%sP: %s%s%s\n", prefix, ansi_highlight_white(), str, ansi_normal());
+        printf("%sP: %s%s%s\n", prefix, ansi_highlight(), str, ansi_normal());
 
         if (sd_device_get_sysname(device, &str) >= 0)
-                printf("%sM: %s%s%s\n", prefix, ansi_highlight_white(), str, ansi_normal());
+                printf("%sM: %s%s%s\n", prefix, ansi_highlight(), str, ansi_normal());
 
         if (sd_device_get_sysnum(device, &str) >= 0)
-                printf("%sR: %s%s%s\n", prefix, ansi_highlight_white(), str, ansi_normal());
+                printf("%sR: %s%s%s\n", prefix, ansi_highlight(), str, ansi_normal());
 
         if (sd_device_get_device_id(device, &str) >= 0)
-                printf("%sJ: %s%s%s\n", prefix, ansi_highlight_white(), str, ansi_normal());
+                printf("%sJ: %s%s%s\n", prefix, ansi_highlight(), str, ansi_normal());
 
         if (sd_device_get_subsystem(device, &subsys) >= 0)
                 printf("%sU: %s%s%s\n", prefix, ansi_highlight_green(), subsys, ansi_normal());