/* This function dumps the ACPI table to a file. */
STATIC BOOLEAN DumpAcpiTableToFile(IN CONST UINT8 *Ptr, IN CONST UINTN Length)
/* This function dumps the ACPI table to a file. */
STATIC BOOLEAN DumpAcpiTableToFile(IN CONST UINT8 *Ptr, IN CONST UINTN Length)
{
  CHAR16               FileNameBuffer[MAX_FILE_NAME_LEN];
  UINTN                TransferBytes;
  SELECTED_ACPI_TABLE  *SelectedTable;
  GetSelectedAcpiTable (&SelectedTable);
  UnicodeSPrint (
    FileNameBuffer,
    sizeof (FileNameBuffer),
    L".\\%s%04d.bin",
    SelectedTable->Name,
    mBinTableCount++
    );
  Print (L"Dumping ACPI table to : %s ... ", FileNameBuffer);
  TransferBytes = ShellDumpBufferToFile (FileNameBuffer, Ptr, Length);
  return (Length == TransferBytes);
}