tem: light color handling is broken

Review Request #208 — Created July 20, 2016 and submitted

tsoome
illumos-gate
7201, 7202
general
tem: light color handling is broken


  • 0
  • 0
  • 5
  • 0
  • 5
Description From Last Updated
tsoome
jclulow
  1. 
      
  2. usr/src/uts/common/io/tem.c (Diff revision 1)
     
     
     
     
     
     

    I would restructure this a little:

    if (flags != 0) {
            /*
             * If either reverse flag is set, the screen is in
             * white-on-black mode.  We set the bold flag to
             * improve readability.
             */
            flags |= TEM_ATTR_BOLD;
    } else {
            /*
             * Otherwise, the screen is in black-on-white mode.
             * The SPARC PROM console, which starts in this mode,
             * uses the bright white background colour so we
             * match it here.
             */
            flags |= TEM_ATTR_BRIGHT_BG;
    ]
    
  3. usr/src/uts/common/io/tem_safe.c (Diff revision 1)
     
     

    I would roll this comment into the comment above, e.g.

    /*
     * Reset the background colour and brightness.
     */
    
  4. usr/src/uts/common/sys/tem_impl.h (Diff revision 1)
     
     

    "fg" -> "foreground"

  5. 
      
tsoome
jclulow
  1. Ship It!
  2. 
      
tsoome
tsoome
jclulow
  1. I compiled and tested the latest diff, and it works as I would expect.

  2. usr/src/uts/common/io/tem_safe.c (Diff revision 5)
     
     
     
     
     
     

    Please use braces for multi-line if condition arms.

  3. usr/src/uts/common/sys/tem_impl.h (Diff revision 5)
     
     
     
     
     
     

    I would reduce the diff here by just adding TEM_ATTR_BRIGHT_FG and TEM_ATTR_BRIGHT_BG onto the end, i.e. as 0x20 and 0x40.

  4. 
      
tsoome
jclulow
  1. Ship It!
  2. 
      
hans
  1. Ship It!
  2. 
      
tsoome
tsoome
Review request changed

Status: Closed (submitted)

Loading...