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=1292 Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
6ea8c546f3
commit
e8f2c16f74
|
@ -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")
|
||||||
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)
|
||||||
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)
|
||||||
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)
|
||||||
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,8 +143,8 @@ 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;
|
||||||
|
@ -161,3 +152,4 @@ acpi_status acpi_db_load_tables(struct acpi_new_table_desc *list_head)
|
||||||
|
|
||||||
return (AE_OK);
|
return (AE_OK);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue