git: 7d59a9451d3b - stable/13 - loader: accept "yellow" as a named color
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 18 Mar 2022 01:59:50 UTC
The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7d59a9451d3baf8c2d506b7b7ffab302f1fd7d15 commit 7d59a9451d3baf8c2d506b7b7ffab302f1fd7d15 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2022-03-11 19:27:46 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2022-03-18 01:58:51 +0000 loader: accept "yellow" as a named color For historical reasons console color number 3 may be either yellow (most consoles) or brown (VGA palette). The console escape code standard uses "yellow", but teken color name constants appear to be based on the VGA scheme and use TC_BROWN for color 3. Even so, the palette table used 50,50,0 as the RGB percentage tuple, resulting in a dim yellow for framebuffer consoles at the time teken was introduced. Amusingly, in 19e2ce2d8367 the comment on the palette entry was changed from "brown" to "dark yellow" but the colour itself was changed from a pure yellow to being somewhat brown. MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit e9249ef9582bec08b9afc3ae65b97f6ffffc6bdf) --- stand/efi/libefi/efi_console.c | 2 +- stand/i386/libi386/vidconsole.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/efi/libefi/efi_console.c b/stand/efi/libefi/efi_console.c index a000b8872c84..010c949faf38 100644 --- a/stand/efi/libefi/efi_console.c +++ b/stand/efi/libefi/efi_console.c @@ -456,7 +456,7 @@ color_name_to_teken(const char *name, int *val) *val = TC_GREEN | light; return (true); } - if (strcasecmp(name, "brown") == 0) { + if (strcasecmp(name, "yellow") == 0 || strcasecmp(name, "brown") == 0) { *val = TC_BROWN | light; return (true); } diff --git a/stand/i386/libi386/vidconsole.c b/stand/i386/libi386/vidconsole.c index 3a6cba8f1561..4f1f22234dc3 100644 --- a/stand/i386/libi386/vidconsole.c +++ b/stand/i386/libi386/vidconsole.c @@ -544,7 +544,7 @@ color_name_to_teken(const char *name, int *val) *val = TC_GREEN | light; return (true); } - if (strcasecmp(name, "brown") == 0) { + if (strcasecmp(name, "yellow") == 0 || strcasecmp(name, "brown") == 0) { *val = TC_BROWN | light; return (true); }