Kernel: Add missing BrightWhite color to VirtualConsole

Because of the 'default' label, the compiler did not warn about the
missing field. The `VERIFY_NOT_REACHED` was moved out of the switch to
fix this.
This commit is contained in:
Daniel Bertalan 2021-06-10 21:30:18 +02:00 committed by Andreas Kling
parent 79a47d9bd3
commit 54a33c45bb
Notes: sideshowbarker 2024-07-18 12:26:15 +09:00

View file

@ -208,7 +208,7 @@ static inline Graphics::Console::Color ansi_color_to_standard_vga_color(VT::Colo
case VT::Color::ANSIColor::Red: case VT::Color::ANSIColor::Red:
return Graphics::Console::Color::Red; return Graphics::Console::Color::Red;
case VT::Color::ANSIColor::Green: case VT::Color::ANSIColor::Green:
return Graphics::Console::Green; return Graphics::Console::Color::Green;
case VT::Color::ANSIColor::Yellow: case VT::Color::ANSIColor::Yellow:
// VGA only has bright yellow, and treats normal yellow as a brownish orange color. // VGA only has bright yellow, and treats normal yellow as a brownish orange color.
return Graphics::Console::Color::Brown; return Graphics::Console::Color::Brown;
@ -220,9 +220,9 @@ static inline Graphics::Console::Color ansi_color_to_standard_vga_color(VT::Colo
return Graphics::Console::Color::Cyan; return Graphics::Console::Color::Cyan;
case VT::Color::ANSIColor::DefaultForeground: case VT::Color::ANSIColor::DefaultForeground:
case VT::Color::ANSIColor::White: case VT::Color::ANSIColor::White:
return Graphics::Console::Color::White;
case VT::Color::ANSIColor::BrightBlack:
return Graphics::Console::Color::LightGray; return Graphics::Console::Color::LightGray;
case VT::Color::ANSIColor::BrightBlack:
return Graphics::Console::Color::DarkGray;
case VT::Color::ANSIColor::BrightRed: case VT::Color::ANSIColor::BrightRed:
return Graphics::Console::Color::BrightRed; return Graphics::Console::Color::BrightRed;
case VT::Color::ANSIColor::BrightGreen: case VT::Color::ANSIColor::BrightGreen:
@ -235,9 +235,10 @@ static inline Graphics::Console::Color ansi_color_to_standard_vga_color(VT::Colo
return Graphics::Console::Color::BrightMagenta; return Graphics::Console::Color::BrightMagenta;
case VT::Color::ANSIColor::BrightCyan: case VT::Color::ANSIColor::BrightCyan:
return Graphics::Console::Color::BrightCyan; return Graphics::Console::Color::BrightCyan;
default: case VT::Color::ANSIColor::BrightWhite:
VERIFY_NOT_REACHED(); return Graphics::Console::Color::White;
} }
VERIFY_NOT_REACHED();
} }
static inline Graphics::Console::Color terminal_to_standard_color(VT::Color color) static inline Graphics::Console::Color terminal_to_standard_color(VT::Color color)