Corrected table deletion on error (supports dsdt only)

date	2001.09.05.20.54.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-06-29 16:22:05 +00:00
parent 63527df026
commit c8d8bb59ae

View File

@ -2,7 +2,7 @@
*
* Module Name: dbfileio - Debugger file I/O commands. These can't usually
* be used when running the debugger in Ring 0 (Kernel mode)
* $Revision: 1.42 $
* $Revision: 1.48 $
*
******************************************************************************/
@ -129,11 +129,9 @@
MODULE_NAME ("dbfileio")
ACPI_PARSE_OBJECT *root;
#ifdef ACPI_APPLICATION
#include <stdio.h>
FILE *DebugFile = NULL;
FILE *AcpiGbl_DebugFile = NULL;
#endif
@ -201,12 +199,12 @@ AcpiDbCloseDebugFile (
#ifdef ACPI_APPLICATION
if (DebugFile)
if (AcpiGbl_DebugFile)
{
fclose (DebugFile);
DebugFile = NULL;
OutputToFile = FALSE;
AcpiOsPrintf ("Debug output file %s closed\n", DebugFilename);
fclose (AcpiGbl_DebugFile);
AcpiGbl_DebugFile = NULL;
AcpiGbl_DbOutputToFile = FALSE;
AcpiOsPrintf ("Debug output file %s closed\n", AcpiGbl_DbDebugFilename);
}
#endif
@ -233,12 +231,12 @@ AcpiDbOpenDebugFile (
#ifdef ACPI_APPLICATION
AcpiDbCloseDebugFile ();
DebugFile = fopen (Name, "w+");
if (DebugFile)
AcpiGbl_DebugFile = fopen (Name, "w+");
if (AcpiGbl_DebugFile)
{
AcpiOsPrintf ("Debug output file %s opened\n", Name);
STRCPY (DebugFilename, Name);
OutputToFile = TRUE;
STRCPY (AcpiGbl_DbDebugFilename, Name);
AcpiGbl_DbOutputToFile = TRUE;
}
else
{
@ -314,7 +312,8 @@ AcpiDbLoadTable(
*TablePtr = ACPI_MEM_ALLOCATE ((size_t) *TableLength);
if (!*TablePtr)
{
AcpiOsPrintf ("Could not allocate memory for the table (size=%X)\n", TableHeader.Length);
AcpiOsPrintf ("Could not allocate memory for ACPI table %4.4s (size=%X)\n",
TableHeader.Signature, TableHeader.Length);
return (AE_NO_MEMORY);
}
@ -404,7 +403,7 @@ AeLocalLoadTable (
{
/* Uninstall table and free the buffer */
AcpiTbUninstallTable (TableInfo.InstalledDesc);
AcpiTbDeleteAcpiTable (ACPI_TABLE_DSDT);
return_ACPI_STATUS (Status);
}
#endif
@ -473,7 +472,7 @@ AcpiDbLoadAcpiTable (
else
{
AcpiOsPrintf ("Could not install table, %s\n",
AcpiUtFormatException (Status));
AcpiFormatException (Status));
}
ACPI_MEM_FREE (TablePtr);