diff options
author | Dan McDonald <danmcd@joyent.com> | 2020-09-22 10:39:49 -0400 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2020-09-22 10:39:49 -0400 |
commit | 267e12a7d9bf6e5fcefb9cc00f46bfff0dc5226e (patch) | |
tree | 19a3941920d0039c35d53a5cbee189b5ca51995a /usr/src/uts/i86pc/boot | |
parent | 517abc5c668925e6092495bf332233c3599980d2 (diff) | |
parent | e9faba760cdf80d7dfa110fe0830917ab94668c2 (diff) | |
download | illumos-joyent-vpc.tar.gz |
Merge branch 'master' into vpcvpc
Diffstat (limited to 'usr/src/uts/i86pc/boot')
-rw-r--r-- | usr/src/uts/i86pc/boot/boot_fb.c | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/usr/src/uts/i86pc/boot/boot_fb.c b/usr/src/uts/i86pc/boot/boot_fb.c index 1ac4789af7..e0e79bd14e 100644 --- a/usr/src/uts/i86pc/boot/boot_fb.c +++ b/usr/src/uts/i86pc/boot/boot_fb.c @@ -354,28 +354,44 @@ boot_get_color(uint32_t *fg, uint32_t *bg) /* ansi to solaris colors, see also boot_console.c */ if (fb_info.inverse == B_TRUE || fb_info.inverse_screen == B_TRUE) { - if (fb_info.fg_color < 16) - *bg = dim_xlate[fb_info.fg_color]; - else + if (fb_info.fg_color < XLATE_NCOLORS) { + /* + * white fg -> bright white bg + */ + if (fb_info.fg_color == pc_white) + *bg = brt_xlate[fb_info.fg_color]; + else + *bg = dim_xlate[fb_info.fg_color]; + } else { *bg = fb_info.fg_color; + } - if (fb_info.bg_color < 16) - *fg = brt_xlate[fb_info.bg_color]; - else + if (fb_info.bg_color < XLATE_NCOLORS) { + if (fb_info.bg_color == pc_white) + *fg = brt_xlate[fb_info.bg_color]; + else + *fg = dim_xlate[fb_info.bg_color]; + } else { *fg = fb_info.bg_color; + } } else { - if (fb_info.bg_color < 16) { - if (fb_info.bg_color == 7) + if (fb_info.fg_color < XLATE_NCOLORS) { + if (fb_info.fg_color == pc_white) + *fg = brt_xlate[fb_info.fg_color]; + else + *fg = dim_xlate[fb_info.fg_color]; + } else { + *fg = fb_info.fg_color; + } + + if (fb_info.bg_color < XLATE_NCOLORS) { + if (fb_info.bg_color == pc_white) *bg = brt_xlate[fb_info.bg_color]; else *bg = dim_xlate[fb_info.bg_color]; } else { *bg = fb_info.bg_color; } - if (fb_info.fg_color < 16) - *fg = dim_xlate[fb_info.fg_color]; - else - *fg = fb_info.fg_color; } } |