Skip to content

Commit

Permalink
Debugger: Fix wrong inclusions in dbfileio.c
Browse files Browse the repository at this point in the history
dbfileio.c implements debugger functionalities that can only be used by the
application layer debugger (acpiexec), thus it should always include
<acapps.h> and thus shouldn't include <stdio.h> separately. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
  • Loading branch information
Lv Zheng committed Jul 22, 2016
1 parent 733458f commit 649eb44
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions source/components/debugger/dbfileio.c
Expand Up @@ -118,15 +118,15 @@
#include "accommon.h"
#include "acdebug.h"
#include "actables.h"
#include <stdio.h>
#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
/*******************************************************************************
*
Expand All @@ -145,8 +145,6 @@ AcpiDbCloseDebugFile (
void)
{

#ifdef ACPI_APPLICATION

if (AcpiGbl_DebugFile)
{
fclose (AcpiGbl_DebugFile);
Expand All @@ -155,7 +153,6 @@ AcpiDbCloseDebugFile (
AcpiOsPrintf ("Debug output file %s closed\n",
AcpiGbl_DbDebugFilename);
}
#endif
}


Expand All @@ -176,8 +173,6 @@ AcpiDbOpenDebugFile (
char *Name)
{

#ifdef ACPI_APPLICATION

AcpiDbCloseDebugFile ();
AcpiGbl_DebugFile = fopen (Name, "w+");
if (!AcpiGbl_DebugFile)
Expand All @@ -190,8 +185,6 @@ AcpiDbOpenDebugFile (
strncpy (AcpiGbl_DbDebugFilename, Name,
sizeof (AcpiGbl_DbDebugFilename));
AcpiGbl_DbOutputToFile = TRUE;

#endif
}
#endif

Expand Down Expand Up @@ -241,12 +234,12 @@ 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;
}

return (AE_OK);
}
#endif

0 comments on commit 649eb44

Please sign in to comment.