/* It returns information for an available text mode that the terminal supports. */
EFI_STATUS EFIAPI TerminalConOutQueryMode(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN UINTN ModeNumber, OUT UINTN *Columns, OUT UINTN *Rows)
/* It returns information for an available text mode that the terminal supports. */
EFI_STATUS EFIAPI TerminalConOutQueryMode(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN UINTN ModeNumber, OUT UINTN *Columns, OUT UINTN *Rows)
{
  TERMINAL_DEV  *TerminalDevice;
  if (ModeNumber >= (UINTN)This->Mode->MaxMode) {
    return EFI_UNSUPPORTED;
  }
  TerminalDevice = TERMINAL_CON_OUT_DEV_FROM_THIS (This);
  *Columns       = TerminalDevice->TerminalConsoleModeData[ModeNumber].Columns;
  *Rows          = TerminalDevice->TerminalConsoleModeData[ModeNumber].Rows;
  return EFI_SUCCESS;
}