diff options
Diffstat (limited to 'source/components/debugger')
-rw-r--r-- | source/components/debugger/dbfileio.c | 18 | ||||
-rw-r--r-- | source/components/debugger/dbinput.c | 2 |
2 files changed, 15 insertions, 5 deletions
diff --git a/source/components/debugger/dbfileio.c b/source/components/debugger/dbfileio.c index 0cda7ab3b0de..f9d7635ecd0c 100644 --- a/source/components/debugger/dbfileio.c +++ b/source/components/debugger/dbfileio.c @@ -216,7 +216,8 @@ AeLocalLoadTable ( ACPI_STATUS AcpiDbGetTableFromFile ( char *Filename, - ACPI_TABLE_HEADER **ReturnTable) + ACPI_TABLE_HEADER **ReturnTable, + BOOLEAN MustBeAmlFile) { #ifdef ACPI_APPLICATION ACPI_STATUS Status; @@ -230,9 +231,18 @@ AcpiDbGetTableFromFile ( return (Status); } -#ifdef ACPI_DATA_TABLE_DISASSEMBLY - IsAmlTable = AcpiUtIsAmlTable (Table); -#endif + if (MustBeAmlFile) + { + IsAmlTable = AcpiUtIsAmlTable (Table); + if (!IsAmlTable) + { + ACPI_EXCEPTION ((AE_INFO, AE_OK, + "Input for -e is not an AML table: " + "\"%4.4s\" (must be DSDT/SSDT)", + Table->Signature)); + return (AE_TYPE); + } + } if (IsAmlTable) { diff --git a/source/components/debugger/dbinput.c b/source/components/debugger/dbinput.c index 2441bc8da92b..80fd3e602b78 100644 --- a/source/components/debugger/dbinput.c +++ b/source/components/debugger/dbinput.c @@ -969,7 +969,7 @@ AcpiDbCommandDispatch ( case CMD_LOAD: - Status = AcpiDbGetTableFromFile (AcpiGbl_DbArgs[1], NULL); + Status = AcpiDbGetTableFromFile (AcpiGbl_DbArgs[1], NULL, FALSE); break; case CMD_LOCKS: |