1 /*******************************************************************************
3 * Module Name: utxferror - Various error/warning output functions
5 ******************************************************************************/
8 * Copyright (C) 2000 - 2013, Intel Corp.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
44 #define EXPORT_ACPI_INTERFACES
46 #include <acpi/acpi.h>
49 #define _COMPONENT ACPI_UTILITIES
50 ACPI_MODULE_NAME("utxferror")
53 * This module is used for the in-kernel ACPICA as well as the ACPICA
56 /*******************************************************************************
58 * FUNCTION: acpi_error
60 * PARAMETERS: module_name - Caller's module name (for error output)
61 * line_number - Caller's line number (for error output)
62 * format - Printf format string + additional args
66 * DESCRIPTION: Print "ACPI Error" message with module/line/version info
68 ******************************************************************************/
69 void ACPI_INTERNAL_VAR_XFACE
70 acpi_error(const char *module_name
, u32 line_number
, const char *format
, ...)
74 ACPI_MSG_REDIRECT_BEGIN
;
75 acpi_os_printf(ACPI_MSG_ERROR
);
77 va_start(arg_list
, format
);
78 acpi_os_vprintf(format
, arg_list
);
82 ACPI_MSG_REDIRECT_END
;
85 ACPI_EXPORT_SYMBOL(acpi_error
)
87 /*******************************************************************************
89 * FUNCTION: acpi_exception
91 * PARAMETERS: module_name - Caller's module name (for error output)
92 * line_number - Caller's line number (for error output)
93 * status - Status to be formatted
94 * format - Printf format string + additional args
98 * DESCRIPTION: Print "ACPI Exception" message with module/line/version info
99 * and decoded acpi_status.
101 ******************************************************************************/
102 void ACPI_INTERNAL_VAR_XFACE
103 acpi_exception(const char *module_name
,
104 u32 line_number
, acpi_status status
, const char *format
, ...)
108 ACPI_MSG_REDIRECT_BEGIN
;
109 acpi_os_printf(ACPI_MSG_EXCEPTION
"%s, ",
110 acpi_format_exception(status
));
112 va_start(arg_list
, format
);
113 acpi_os_vprintf(format
, arg_list
);
117 ACPI_MSG_REDIRECT_END
;
120 ACPI_EXPORT_SYMBOL(acpi_exception
)
122 /*******************************************************************************
124 * FUNCTION: acpi_warning
126 * PARAMETERS: module_name - Caller's module name (for error output)
127 * line_number - Caller's line number (for error output)
128 * format - Printf format string + additional args
132 * DESCRIPTION: Print "ACPI Warning" message with module/line/version info
134 ******************************************************************************/
135 void ACPI_INTERNAL_VAR_XFACE
136 acpi_warning(const char *module_name
, u32 line_number
, const char *format
, ...)
140 ACPI_MSG_REDIRECT_BEGIN
;
141 acpi_os_printf(ACPI_MSG_WARNING
);
143 va_start(arg_list
, format
);
144 acpi_os_vprintf(format
, arg_list
);
148 ACPI_MSG_REDIRECT_END
;
151 ACPI_EXPORT_SYMBOL(acpi_warning
)
153 /*******************************************************************************
155 * FUNCTION: acpi_info
157 * PARAMETERS: module_name - Caller's module name (for error output)
158 * line_number - Caller's line number (for error output)
159 * format - Printf format string + additional args
163 * DESCRIPTION: Print generic "ACPI:" information message. There is no
164 * module/line/version info in order to keep the message simple.
166 * TBD: module_name and line_number args are not needed, should be removed.
168 ******************************************************************************/
169 void ACPI_INTERNAL_VAR_XFACE
170 acpi_info(const char *module_name
, u32 line_number
, const char *format
, ...)
174 ACPI_MSG_REDIRECT_BEGIN
;
175 acpi_os_printf(ACPI_MSG_INFO
);
177 va_start(arg_list
, format
);
178 acpi_os_vprintf(format
, arg_list
);
179 acpi_os_printf("\n");
182 ACPI_MSG_REDIRECT_END
;
185 ACPI_EXPORT_SYMBOL(acpi_info
)
187 /*******************************************************************************
189 * FUNCTION: acpi_bios_error
191 * PARAMETERS: module_name - Caller's module name (for error output)
192 * line_number - Caller's line number (for error output)
193 * format - Printf format string + additional args
197 * DESCRIPTION: Print "ACPI Firmware Error" message with module/line/version
200 ******************************************************************************/
201 void ACPI_INTERNAL_VAR_XFACE
202 acpi_bios_error(const char *module_name
,
203 u32 line_number
, const char *format
, ...)
207 ACPI_MSG_REDIRECT_BEGIN
;
208 acpi_os_printf(ACPI_MSG_BIOS_ERROR
);
210 va_start(arg_list
, format
);
211 acpi_os_vprintf(format
, arg_list
);
215 ACPI_MSG_REDIRECT_END
;
218 ACPI_EXPORT_SYMBOL(acpi_bios_error
)
220 /*******************************************************************************
222 * FUNCTION: acpi_bios_warning
224 * PARAMETERS: module_name - Caller's module name (for error output)
225 * line_number - Caller's line number (for error output)
226 * format - Printf format string + additional args
230 * DESCRIPTION: Print "ACPI Firmware Warning" message with module/line/version
233 ******************************************************************************/
234 void ACPI_INTERNAL_VAR_XFACE
235 acpi_bios_warning(const char *module_name
,
236 u32 line_number
, const char *format
, ...)
240 ACPI_MSG_REDIRECT_BEGIN
;
241 acpi_os_printf(ACPI_MSG_BIOS_WARNING
);
243 va_start(arg_list
, format
);
244 acpi_os_vprintf(format
, arg_list
);
248 ACPI_MSG_REDIRECT_END
;
251 ACPI_EXPORT_SYMBOL(acpi_bios_warning
)