diff options
author | Bob Moore <robert.moore@intel.com> | 2013-06-07 20:58:00 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-06-15 18:54:08 -0400 |
commit | b6872ff9a4785a790f9647ee2076e7e616a3bb0e (patch) | |
tree | 4ba10a72ce48dcacf437aaae1627ce6548206dc3 /drivers/acpi/acpica/acutils.h | |
parent | 88ec28603c09ccba0346c15eef64ff0b4327c9ee (diff) |
ACPICA: Split internal error msg routines to a separate file
Improves configurability of ACPICA.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Acked-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/acutils.h')
-rw-r--r-- | drivers/acpi/acpica/acutils.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h index 19e5cf72ab6a..d552036935d4 100644 --- a/drivers/acpi/acpica/acutils.h +++ b/drivers/acpi/acpica/acutils.h | |||
@@ -87,6 +87,48 @@ extern const char *acpi_gbl_fc_decode[]; | |||
87 | extern const char *acpi_gbl_pt_decode[]; | 87 | extern const char *acpi_gbl_pt_decode[]; |
88 | #endif | 88 | #endif |
89 | 89 | ||
90 | /* | ||
91 | * For the iASL compiler case, the output is redirected to stderr so that | ||
92 | * any of the various ACPI errors and warnings do not appear in the output | ||
93 | * files, for either the compiler or disassembler portions of the tool. | ||
94 | */ | ||
95 | #ifdef ACPI_ASL_COMPILER | ||
96 | |||
97 | #include <stdio.h> | ||
98 | extern FILE *acpi_gbl_output_file; | ||
99 | |||
100 | #define ACPI_MSG_REDIRECT_BEGIN \ | ||
101 | FILE *output_file = acpi_gbl_output_file; \ | ||
102 | acpi_os_redirect_output (stderr); | ||
103 | |||
104 | #define ACPI_MSG_REDIRECT_END \ | ||
105 | acpi_os_redirect_output (output_file); | ||
106 | |||
107 | #else | ||
108 | /* | ||
109 | * non-iASL case - no redirection, nothing to do | ||
110 | */ | ||
111 | #define ACPI_MSG_REDIRECT_BEGIN | ||
112 | #define ACPI_MSG_REDIRECT_END | ||
113 | #endif | ||
114 | |||
115 | /* | ||
116 | * Common error message prefixes | ||
117 | */ | ||
118 | #define ACPI_MSG_ERROR "ACPI Error: " | ||
119 | #define ACPI_MSG_EXCEPTION "ACPI Exception: " | ||
120 | #define ACPI_MSG_WARNING "ACPI Warning: " | ||
121 | #define ACPI_MSG_INFO "ACPI: " | ||
122 | |||
123 | #define ACPI_MSG_BIOS_ERROR "ACPI BIOS Error (bug): " | ||
124 | #define ACPI_MSG_BIOS_WARNING "ACPI BIOS Warning (bug): " | ||
125 | |||
126 | /* | ||
127 | * Common message suffix | ||
128 | */ | ||
129 | #define ACPI_MSG_SUFFIX \ | ||
130 | acpi_os_printf (" (%8.8X/%s-%u)\n", ACPI_CA_VERSION, module_name, line_number) | ||
131 | |||
90 | /* Types for Resource descriptor entries */ | 132 | /* Types for Resource descriptor entries */ |
91 | 133 | ||
92 | #define ACPI_INVALID_RESOURCE 0 | 134 | #define ACPI_INVALID_RESOURCE 0 |