This source file includes following definitions.
- ACPI_MODULE_NAME
- acpi_db_open_debug_file
- acpi_db_load_tables
1
2
3
4
5
6
7
8
9 #include <acpi/acpi.h>
10 #include "accommon.h"
11 #include "acdebug.h"
12 #include "actables.h"
13
14 #define _COMPONENT ACPI_CA_DEBUGGER
15 ACPI_MODULE_NAME("dbfileio")
16
17 #ifdef ACPI_APPLICATION
18 #include "acapps.h"
19 #ifdef ACPI_DEBUGGER
20
21
22
23
24
25
26
27
28
29
30
31 void acpi_db_close_debug_file(void)
32 {
33
34 if (acpi_gbl_debug_file) {
35 fclose(acpi_gbl_debug_file);
36 acpi_gbl_debug_file = NULL;
37 acpi_gbl_db_output_to_file = FALSE;
38 acpi_os_printf("Debug output file %s closed\n",
39 acpi_gbl_db_debug_filename);
40 }
41 }
42
43
44
45
46
47
48
49
50
51
52
53
54
55 void acpi_db_open_debug_file(char *name)
56 {
57
58 acpi_db_close_debug_file();
59 acpi_gbl_debug_file = fopen(name, "w+");
60 if (!acpi_gbl_debug_file) {
61 acpi_os_printf("Could not open debug file %s\n", name);
62 return;
63 }
64
65 acpi_os_printf("Debug output file %s opened\n", name);
66 acpi_ut_safe_strncpy(acpi_gbl_db_debug_filename, name,
67 sizeof(acpi_gbl_db_debug_filename));
68 acpi_gbl_db_output_to_file = TRUE;
69 }
70 #endif
71
72
73
74
75
76
77
78
79
80
81
82
83
84 acpi_status acpi_db_load_tables(struct acpi_new_table_desc *list_head)
85 {
86 acpi_status status;
87 struct acpi_new_table_desc *table_list_head;
88 struct acpi_table_header *table;
89
90
91
92 table_list_head = list_head;
93 while (table_list_head) {
94 table = table_list_head->table;
95
96 status = acpi_load_table(table);
97 if (ACPI_FAILURE(status)) {
98 if (status == AE_ALREADY_EXISTS) {
99 acpi_os_printf
100 ("Table %4.4s is already installed\n",
101 table->signature);
102 } else {
103 acpi_os_printf("Could not install table, %s\n",
104 acpi_format_exception(status));
105 }
106
107 return (status);
108 }
109
110 acpi_os_printf
111 ("Acpi table [%4.4s] successfully installed and loaded\n",
112 table->signature);
113
114 table_list_head = table_list_head->next;
115 }
116
117 return (AE_OK);
118 }
119 #endif