From 649eb441fbef21965d10a1aca6ff41dcf23f8e05 Mon Sep 17 00:00:00 2001 From: Lv Zheng Date: Fri, 22 Jul 2016 23:48:13 +0800 Subject: [PATCH] Debugger: Fix wrong inclusions in dbfileio.c dbfileio.c implements debugger functionalities that can only be used by the application layer debugger (acpiexec), thus it should always include and thus shouldn't include separately. Lv Zheng. Signed-off-by: Lv Zheng --- source/components/debugger/dbfileio.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/source/components/debugger/dbfileio.c b/source/components/debugger/dbfileio.c index d7942b7459..ecc202fbc1 100644 --- a/source/components/debugger/dbfileio.c +++ b/source/components/debugger/dbfileio.c @@ -118,15 +118,15 @@ #include "accommon.h" #include "acdebug.h" #include "actables.h" -#include -#ifdef ACPI_APPLICATION -#include "acapps.h" -#endif #define _COMPONENT ACPI_CA_DEBUGGER ACPI_MODULE_NAME ("dbfileio") +#ifdef ACPI_APPLICATION +#include "acapps.h" + + #ifdef ACPI_DEBUGGER /******************************************************************************* * @@ -145,8 +145,6 @@ AcpiDbCloseDebugFile ( void) { -#ifdef ACPI_APPLICATION - if (AcpiGbl_DebugFile) { fclose (AcpiGbl_DebugFile); @@ -155,7 +153,6 @@ AcpiDbCloseDebugFile ( AcpiOsPrintf ("Debug output file %s closed\n", AcpiGbl_DbDebugFilename); } -#endif } @@ -176,8 +173,6 @@ AcpiDbOpenDebugFile ( char *Name) { -#ifdef ACPI_APPLICATION - AcpiDbCloseDebugFile (); AcpiGbl_DebugFile = fopen (Name, "w+"); if (!AcpiGbl_DebugFile) @@ -190,8 +185,6 @@ AcpiDbOpenDebugFile ( strncpy (AcpiGbl_DbDebugFilename, Name, sizeof (AcpiGbl_DbDebugFilename)); AcpiGbl_DbOutputToFile = TRUE; - -#endif } #endif @@ -241,8 +234,7 @@ AcpiDbLoadTables ( return (Status); } - fprintf (stderr, - "Acpi table [%4.4s] successfully installed and loaded\n", + AcpiOsPrintf ("Acpi table [%4.4s] successfully installed and loaded\n", Table->Signature); TableListHead = TableListHead->Next; @@ -250,3 +242,4 @@ AcpiDbLoadTables ( return (AE_OK); } +#endif