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 __UTXFERROR_C__
45 #define EXPORT_ACPI_INTERFACES
51 #define _COMPONENT ACPI_UTILITIES
52 ACPI_MODULE_NAME ("utxferror")
55 * This module is used for the in-kernel ACPICA as well as the ACPICA
59 /*******************************************************************************
63 * PARAMETERS: ModuleName - Caller's module name (for error output)
64 * LineNumber - Caller's line number (for error output)
65 * Format - Printf format string + additional args
69 * DESCRIPTION: Print "ACPI Error" message with module/line/version info
71 ******************************************************************************/
73 void ACPI_INTERNAL_VAR_XFACE
75 const char *ModuleName
,
83 ACPI_MSG_REDIRECT_BEGIN
;
84 AcpiOsPrintf (ACPI_MSG_ERROR
);
86 va_start (ArgList
, Format
);
87 AcpiOsVprintf (Format
, ArgList
);
91 ACPI_MSG_REDIRECT_END
;
94 ACPI_EXPORT_SYMBOL (AcpiError
)
97 /*******************************************************************************
99 * FUNCTION: AcpiException
101 * PARAMETERS: ModuleName - Caller's module name (for error output)
102 * LineNumber - Caller's line number (for error output)
103 * Status - Status to be formatted
104 * Format - Printf format string + additional args
108 * DESCRIPTION: Print "ACPI Exception" message with module/line/version info
109 * and decoded ACPI_STATUS.
111 ******************************************************************************/
113 void ACPI_INTERNAL_VAR_XFACE
115 const char *ModuleName
,
124 ACPI_MSG_REDIRECT_BEGIN
;
125 AcpiOsPrintf (ACPI_MSG_EXCEPTION
"%s, ", AcpiFormatException (Status
));
127 va_start (ArgList
, Format
);
128 AcpiOsVprintf (Format
, ArgList
);
132 ACPI_MSG_REDIRECT_END
;
135 ACPI_EXPORT_SYMBOL (AcpiException
)
138 /*******************************************************************************
140 * FUNCTION: AcpiWarning
142 * PARAMETERS: ModuleName - Caller's module name (for error output)
143 * LineNumber - Caller's line number (for error output)
144 * Format - Printf format string + additional args
148 * DESCRIPTION: Print "ACPI Warning" message with module/line/version info
150 ******************************************************************************/
152 void ACPI_INTERNAL_VAR_XFACE
154 const char *ModuleName
,
162 ACPI_MSG_REDIRECT_BEGIN
;
163 AcpiOsPrintf (ACPI_MSG_WARNING
);
165 va_start (ArgList
, Format
);
166 AcpiOsVprintf (Format
, ArgList
);
170 ACPI_MSG_REDIRECT_END
;
173 ACPI_EXPORT_SYMBOL (AcpiWarning
)
176 /*******************************************************************************
180 * PARAMETERS: ModuleName - Caller's module name (for error output)
181 * LineNumber - Caller's line number (for error output)
182 * Format - Printf format string + additional args
186 * DESCRIPTION: Print generic "ACPI:" information message. There is no
187 * module/line/version info in order to keep the message simple.
189 * TBD: ModuleName and LineNumber args are not needed, should be removed.
191 ******************************************************************************/
193 void ACPI_INTERNAL_VAR_XFACE
195 const char *ModuleName
,
203 ACPI_MSG_REDIRECT_BEGIN
;
204 AcpiOsPrintf (ACPI_MSG_INFO
);
206 va_start (ArgList
, Format
);
207 AcpiOsVprintf (Format
, ArgList
);
211 ACPI_MSG_REDIRECT_END
;
214 ACPI_EXPORT_SYMBOL (AcpiInfo
)
217 /*******************************************************************************
219 * FUNCTION: AcpiBiosError
221 * PARAMETERS: ModuleName - Caller's module name (for error output)
222 * LineNumber - Caller's line number (for error output)
223 * Format - Printf format string + additional args
227 * DESCRIPTION: Print "ACPI Firmware Error" message with module/line/version
230 ******************************************************************************/
232 void ACPI_INTERNAL_VAR_XFACE
234 const char *ModuleName
,
242 ACPI_MSG_REDIRECT_BEGIN
;
243 AcpiOsPrintf (ACPI_MSG_BIOS_ERROR
);
245 va_start (ArgList
, Format
);
246 AcpiOsVprintf (Format
, ArgList
);
250 ACPI_MSG_REDIRECT_END
;
253 ACPI_EXPORT_SYMBOL (AcpiBiosError
)
256 /*******************************************************************************
258 * FUNCTION: AcpiBiosWarning
260 * PARAMETERS: ModuleName - Caller's module name (for error output)
261 * LineNumber - Caller's line number (for error output)
262 * Format - Printf format string + additional args
266 * DESCRIPTION: Print "ACPI Firmware Warning" message with module/line/version
269 ******************************************************************************/
271 void ACPI_INTERNAL_VAR_XFACE
273 const char *ModuleName
,
281 ACPI_MSG_REDIRECT_BEGIN
;
282 AcpiOsPrintf (ACPI_MSG_BIOS_WARNING
);
284 va_start (ArgList
, Format
);
285 AcpiOsVprintf (Format
, ArgList
);
289 ACPI_MSG_REDIRECT_END
;
292 ACPI_EXPORT_SYMBOL (AcpiBiosWarning
)