summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-03-05 22:43:39 +0000
committerjhb <jhb@FreeBSD.org>2001-03-05 22:43:39 +0000
commit16933c586df1308a3af87eae7d0360783bd1e38d (patch)
tree4dd001b786689cccca4434c0ee66ead04d75b7b1
parent7b8b7b318ee5a185ddeae96a62a13a5fe25df1d2 (diff)
downloadFreeBSD-src-16933c586df1308a3af87eae7d0360783bd1e38d.zip
FreeBSD-src-16933c586df1308a3af87eae7d0360783bd1e38d.tar.gz
The SRM console gets the red and blue attributes backwards in the VGA
palette. As a result, the colors on the video console can look rather weird. For example, sysinstall on the alpha has a read background. We can work around this partially by remapping the colors used by syscons for the ANSI color escape sequences. Note that screen savers and anything that sets the colors explicitly will still get incorrect colors, but programs such as sysinstall will now use the correct colors. A more correct fix would be to actually fix the VGA palette on boot by either swapping all the red and blue attributes or by hardcoding a standard palette and overwriting the entire palette. Requested by: gallatin Obtained from: NetBSD
-rw-r--r--sys/dev/syscons/scterm-sc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/dev/syscons/scterm-sc.c b/sys/dev/syscons/scterm-sc.c
index fdf92b0..8362220 100644
--- a/sys/dev/syscons/scterm-sc.c
+++ b/sys/dev/syscons/scterm-sc.c
@@ -172,10 +172,22 @@ static void
scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
{
static u_char ansi_col[16] = {
+#ifdef __alpha__
+ /*
+ * DEC is evil. They switch the red and blue attributes in the
+ * palette in the system console. As a simple work-around, re-map
+ * the ANSI colors appropriately.
+ */
+ FG_BLACK, FG_BLUE, FG_GREEN, FG_CYAN,
+ FG_RED, FG_MAGENTA, FG_BROWN, FG_LIGHTGREY,
+ FG_DARKGREY, FG_LIGHTBLUE, FG_LIGHTGREEN, FG_LIGHTCYAN,
+ FG_LIGHTRED, FG_LIGHTMAGENTA, FG_YELLOW, FG_WHITE
+#else
FG_BLACK, FG_RED, FG_GREEN, FG_BROWN,
FG_BLUE, FG_MAGENTA, FG_CYAN, FG_LIGHTGREY,
FG_DARKGREY, FG_LIGHTRED, FG_LIGHTGREEN, FG_YELLOW,
FG_LIGHTBLUE, FG_LIGHTMAGENTA, FG_LIGHTCYAN, FG_WHITE
+#endif
};
sc_softc_t *sc;
int i, n;
OpenPOWER on IntegriCloud