1 /*******************************************************************************
3 * Module Name: utxferror - Various error/warning output functions
5 ******************************************************************************/
8 * Copyright (C) 2000 - 2018, 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
50 #define _COMPONENT ACPI_UTILITIES
51 ACPI_MODULE_NAME ("utxferror")
54 * This module is used for the in-kernel ACPICA as well as the ACPICA
58 #ifndef ACPI_NO_ERROR_MESSAGES /* Entire module */
60 /*******************************************************************************
64 * PARAMETERS: ModuleName - Caller's module name (for error output)
65 * LineNumber - Caller's line number (for error output)
66 * Format - Printf format string + additional args
70 * DESCRIPTION: Print "ACPI Error" message with module/line/version info
72 ******************************************************************************/
74 void ACPI_INTERNAL_VAR_XFACE
76 const char *ModuleName
,
84 ACPI_MSG_REDIRECT_BEGIN
;
85 AcpiOsPrintf (ACPI_MSG_ERROR
);
87 va_start (ArgList
, Format
);
88 AcpiOsVprintf (Format
, ArgList
);
92 ACPI_MSG_REDIRECT_END
;
95 ACPI_EXPORT_SYMBOL (AcpiError
)
98 /*******************************************************************************
100 * FUNCTION: AcpiException
102 * PARAMETERS: ModuleName - Caller's module name (for error output)
103 * LineNumber - Caller's line number (for error output)
104 * Status - Status value to be decoded/formatted
105 * Format - Printf format string + additional args
109 * DESCRIPTION: Print an "ACPI Error" message with module/line/version
110 * info as well as decoded ACPI_STATUS.
112 ******************************************************************************/
114 void ACPI_INTERNAL_VAR_XFACE
116 const char *ModuleName
,
125 ACPI_MSG_REDIRECT_BEGIN
;
127 /* For AE_OK, just print the message */
129 if (ACPI_SUCCESS (Status
))
131 AcpiOsPrintf (ACPI_MSG_ERROR
);
136 AcpiOsPrintf (ACPI_MSG_ERROR
"%s, ",
137 AcpiFormatException (Status
));
140 va_start (ArgList
, Format
);
141 AcpiOsVprintf (Format
, ArgList
);
145 ACPI_MSG_REDIRECT_END
;
148 ACPI_EXPORT_SYMBOL (AcpiException
)
151 /*******************************************************************************
153 * FUNCTION: AcpiWarning
155 * PARAMETERS: ModuleName - Caller's module name (for warning output)
156 * LineNumber - Caller's line number (for warning output)
157 * Format - Printf format string + additional args
161 * DESCRIPTION: Print "ACPI Warning" message with module/line/version info
163 ******************************************************************************/
165 void ACPI_INTERNAL_VAR_XFACE
167 const char *ModuleName
,
175 ACPI_MSG_REDIRECT_BEGIN
;
176 AcpiOsPrintf (ACPI_MSG_WARNING
);
178 va_start (ArgList
, Format
);
179 AcpiOsVprintf (Format
, ArgList
);
183 ACPI_MSG_REDIRECT_END
;
186 ACPI_EXPORT_SYMBOL (AcpiWarning
)
189 /*******************************************************************************
193 * PARAMETERS: Format - Printf format string + additional args
197 * DESCRIPTION: Print generic "ACPI:" information message. There is no
198 * module/line/version info in order to keep the message simple.
200 ******************************************************************************/
202 void ACPI_INTERNAL_VAR_XFACE
210 ACPI_MSG_REDIRECT_BEGIN
;
211 AcpiOsPrintf (ACPI_MSG_INFO
);
213 va_start (ArgList
, Format
);
214 AcpiOsVprintf (Format
, ArgList
);
218 ACPI_MSG_REDIRECT_END
;
221 ACPI_EXPORT_SYMBOL (AcpiInfo
)
224 /*******************************************************************************
226 * FUNCTION: AcpiBiosError
228 * PARAMETERS: ModuleName - Caller's module name (for error output)
229 * LineNumber - Caller's line number (for error output)
230 * Format - Printf format string + additional args
234 * DESCRIPTION: Print "ACPI Firmware Error" message with module/line/version
237 ******************************************************************************/
239 void ACPI_INTERNAL_VAR_XFACE
241 const char *ModuleName
,
249 ACPI_MSG_REDIRECT_BEGIN
;
250 AcpiOsPrintf (ACPI_MSG_BIOS_ERROR
);
252 va_start (ArgList
, Format
);
253 AcpiOsVprintf (Format
, ArgList
);
257 ACPI_MSG_REDIRECT_END
;
260 ACPI_EXPORT_SYMBOL (AcpiBiosError
)
263 /*******************************************************************************
265 * FUNCTION: AcpiBiosWarning
267 * PARAMETERS: ModuleName - Caller's module name (for warning output)
268 * LineNumber - Caller's line number (for warning output)
269 * Format - Printf format string + additional args
273 * DESCRIPTION: Print "ACPI Firmware Warning" message with module/line/version
276 ******************************************************************************/
278 void ACPI_INTERNAL_VAR_XFACE
280 const char *ModuleName
,
288 ACPI_MSG_REDIRECT_BEGIN
;
289 AcpiOsPrintf (ACPI_MSG_BIOS_WARNING
);
291 va_start (ArgList
, Format
);
292 AcpiOsVprintf (Format
, ArgList
);
296 ACPI_MSG_REDIRECT_END
;
299 ACPI_EXPORT_SYMBOL (AcpiBiosWarning
)
301 #endif /* ACPI_NO_ERROR_MESSAGES */