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__
46 #include <contrib/dev/acpica/include/acpi.h>
47 #include <contrib/dev/acpica/include/accommon.h>
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 /*******************************************************************************
62 * PARAMETERS: ModuleName - Caller's module name (for error output)
63 * LineNumber - Caller's line number (for error output)
64 * Format - Printf format string + additional args
68 * DESCRIPTION: Print "ACPI Error" message with module/line/version info
70 ******************************************************************************/
72 void ACPI_INTERNAL_VAR_XFACE
74 const char *ModuleName,
82 ACPI_MSG_REDIRECT_BEGIN;
83 AcpiOsPrintf (ACPI_MSG_ERROR);
85 va_start (ArgList, Format);
86 AcpiOsVprintf (Format, ArgList);
90 ACPI_MSG_REDIRECT_END;
93 ACPI_EXPORT_SYMBOL (AcpiError)
96 /*******************************************************************************
98 * FUNCTION: AcpiException
100 * PARAMETERS: ModuleName - Caller's module name (for error output)
101 * LineNumber - Caller's line number (for error output)
102 * Status - Status to be formatted
103 * Format - Printf format string + additional args
107 * DESCRIPTION: Print "ACPI Exception" message with module/line/version info
108 * and decoded ACPI_STATUS.
110 ******************************************************************************/
112 void ACPI_INTERNAL_VAR_XFACE
114 const char *ModuleName,
123 ACPI_MSG_REDIRECT_BEGIN;
124 AcpiOsPrintf (ACPI_MSG_EXCEPTION "%s, ", AcpiFormatException (Status));
126 va_start (ArgList, Format);
127 AcpiOsVprintf (Format, ArgList);
131 ACPI_MSG_REDIRECT_END;
134 ACPI_EXPORT_SYMBOL (AcpiException)
137 /*******************************************************************************
139 * FUNCTION: AcpiWarning
141 * PARAMETERS: ModuleName - Caller's module name (for error output)
142 * LineNumber - Caller's line number (for error output)
143 * Format - Printf format string + additional args
147 * DESCRIPTION: Print "ACPI Warning" message with module/line/version info
149 ******************************************************************************/
151 void ACPI_INTERNAL_VAR_XFACE
153 const char *ModuleName,
161 ACPI_MSG_REDIRECT_BEGIN;
162 AcpiOsPrintf (ACPI_MSG_WARNING);
164 va_start (ArgList, Format);
165 AcpiOsVprintf (Format, ArgList);
169 ACPI_MSG_REDIRECT_END;
172 ACPI_EXPORT_SYMBOL (AcpiWarning)
175 /*******************************************************************************
179 * PARAMETERS: ModuleName - Caller's module name (for error output)
180 * LineNumber - Caller's line number (for error output)
181 * Format - Printf format string + additional args
185 * DESCRIPTION: Print generic "ACPI:" information message. There is no
186 * module/line/version info in order to keep the message simple.
188 * TBD: ModuleName and LineNumber args are not needed, should be removed.
190 ******************************************************************************/
192 void ACPI_INTERNAL_VAR_XFACE
194 const char *ModuleName,
202 /* Temporarily hide too verbose printfs. */
207 ACPI_MSG_REDIRECT_BEGIN;
208 AcpiOsPrintf (ACPI_MSG_INFO);
210 va_start (ArgList, Format);
211 AcpiOsVprintf (Format, ArgList);
215 ACPI_MSG_REDIRECT_END;
218 ACPI_EXPORT_SYMBOL (AcpiInfo)
221 /*******************************************************************************
223 * FUNCTION: AcpiBiosError
225 * PARAMETERS: ModuleName - Caller's module name (for error output)
226 * LineNumber - Caller's line number (for error output)
227 * Format - Printf format string + additional args
231 * DESCRIPTION: Print "ACPI Firmware Error" message with module/line/version
234 ******************************************************************************/
236 void ACPI_INTERNAL_VAR_XFACE
238 const char *ModuleName,
246 ACPI_MSG_REDIRECT_BEGIN;
247 AcpiOsPrintf (ACPI_MSG_BIOS_ERROR);
249 va_start (ArgList, Format);
250 AcpiOsVprintf (Format, ArgList);
254 ACPI_MSG_REDIRECT_END;
257 ACPI_EXPORT_SYMBOL (AcpiBiosError)
260 /*******************************************************************************
262 * FUNCTION: AcpiBiosWarning
264 * PARAMETERS: ModuleName - Caller's module name (for error output)
265 * LineNumber - Caller's line number (for error output)
266 * Format - Printf format string + additional args
270 * DESCRIPTION: Print "ACPI Firmware Warning" message with module/line/version
273 ******************************************************************************/
275 void ACPI_INTERNAL_VAR_XFACE
277 const char *ModuleName,
285 ACPI_MSG_REDIRECT_BEGIN;
286 AcpiOsPrintf (ACPI_MSG_BIOS_WARNING);
288 va_start (ArgList, Format);
289 AcpiOsVprintf (Format, ArgList);
293 ACPI_MSG_REDIRECT_END;
296 ACPI_EXPORT_SYMBOL (AcpiBiosWarning)