From 9229f2a86aed3b4a289edcf6d55dbd31c2f3dfdb Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 13 Feb 2026 14:31:54 +0900 Subject: [PATCH] udevadm: do not explicitly set white color Otherwise, output on black-on-white terminals is not visible. Follow-up for 13005c8f2c7f0169728fef804f164c3574b8e0f7. Fixes #40629. (cherry picked from commit 7577bb4c08116c755449a17bdadbb719ee19cb67) (cherry picked from commit d97e6e3eb7b79b2c46904a1324bb8ccf35081207) (cherry picked from commit f89bf80f6f5064580167a02b5b9f64119ff575b4) --- src/udev/udevadm-info.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/udev/udevadm-info.c b/src/udev/udevadm-info.c index 57f063b0108..fc4fa8ae4a4 100644 --- a/src/udev/udevadm-info.c +++ b/src/udev/udevadm-info.c @@ -309,7 +309,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 @@ -317,16 +317,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()); -- 2.47.3