Commit e8f2c16f authored by Lv Zheng's avatar Lv Zheng Committed by Rafael J. Wysocki

ACPICA: Debugger: Fix wrong inclusions in dbfileio.c

ACPICA commit 649eb441fbef21965d10a1aca6ff41dcf23f8e05

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.

Link: https://github.com/acpica/acpica/commit/649eb441
Link: https://bugs.acpica.org/show_bug.cgi?id=1292Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 6ea8c546
...@@ -46,14 +46,12 @@ ...@@ -46,14 +46,12 @@
#include "accommon.h" #include "accommon.h"
#include "acdebug.h" #include "acdebug.h"
#include "actables.h" #include "actables.h"
#include <stdio.h>
#ifdef ACPI_APPLICATION
#include "acapps.h"
#endif
#define _COMPONENT ACPI_CA_DEBUGGER #define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME("dbfileio") ACPI_MODULE_NAME("dbfileio")
#ifdef ACPI_APPLICATION
#include "acapps.h"
#ifdef ACPI_DEBUGGER #ifdef ACPI_DEBUGGER
/******************************************************************************* /*******************************************************************************
* *
...@@ -69,8 +67,6 @@ ACPI_MODULE_NAME("dbfileio") ...@@ -69,8 +67,6 @@ ACPI_MODULE_NAME("dbfileio")
void acpi_db_close_debug_file(void) void acpi_db_close_debug_file(void)
{ {
#ifdef ACPI_APPLICATION
if (acpi_gbl_debug_file) { if (acpi_gbl_debug_file) {
fclose(acpi_gbl_debug_file); fclose(acpi_gbl_debug_file);
acpi_gbl_debug_file = NULL; acpi_gbl_debug_file = NULL;
...@@ -78,7 +74,6 @@ void acpi_db_close_debug_file(void) ...@@ -78,7 +74,6 @@ void acpi_db_close_debug_file(void)
acpi_os_printf("Debug output file %s closed\n", acpi_os_printf("Debug output file %s closed\n",
acpi_gbl_db_debug_filename); acpi_gbl_db_debug_filename);
} }
#endif
} }
/******************************************************************************* /*******************************************************************************
...@@ -96,8 +91,6 @@ void acpi_db_close_debug_file(void) ...@@ -96,8 +91,6 @@ void acpi_db_close_debug_file(void)
void acpi_db_open_debug_file(char *name) void acpi_db_open_debug_file(char *name)
{ {
#ifdef ACPI_APPLICATION
acpi_db_close_debug_file(); acpi_db_close_debug_file();
acpi_gbl_debug_file = fopen(name, "w+"); acpi_gbl_debug_file = fopen(name, "w+");
if (!acpi_gbl_debug_file) { if (!acpi_gbl_debug_file) {
...@@ -109,8 +102,6 @@ void acpi_db_open_debug_file(char *name) ...@@ -109,8 +102,6 @@ void acpi_db_open_debug_file(char *name)
strncpy(acpi_gbl_db_debug_filename, name, strncpy(acpi_gbl_db_debug_filename, name,
sizeof(acpi_gbl_db_debug_filename)); sizeof(acpi_gbl_db_debug_filename));
acpi_gbl_db_output_to_file = TRUE; acpi_gbl_db_output_to_file = TRUE;
#endif
} }
#endif #endif
...@@ -152,12 +143,13 @@ acpi_status acpi_db_load_tables(struct acpi_new_table_desc *list_head) ...@@ -152,12 +143,13 @@ acpi_status acpi_db_load_tables(struct acpi_new_table_desc *list_head)
return (status); return (status);
} }
fprintf(stderr, acpi_os_printf
"Acpi table [%4.4s] successfully installed and loaded\n", ("Acpi table [%4.4s] successfully installed and loaded\n",
table->signature); table->signature);
table_list_head = table_list_head->next; table_list_head = table_list_head->next;
} }
return (AE_OK); return (AE_OK);
} }
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment