git: e9249ef9582b - main - loader: accept "yellow" as a named color

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Fri, 11 Mar 2022 20:22:24 UTC
The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=e9249ef9582bec08b9afc3ae65b97f6ffffc6bdf

commit e9249ef9582bec08b9afc3ae65b97f6ffffc6bdf
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2022-03-11 19:27:46 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2022-03-11 20:22:13 +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
---
 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 8cfb1a748a73..de4c26b2fd72 100644
--- a/stand/efi/libefi/efi_console.c
+++ b/stand/efi/libefi/efi_console.c
@@ -457,7 +457,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);
 	}