Rev 1498 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1498 | Rev 2216 | ||
---|---|---|---|
Line 7... | Line 7... | ||
7 | 7 | ||
8 | /****************************************************************************** |
8 | /****************************************************************************** |
9 | * |
9 | * |
10 | * 1. Copyright Notice |
10 | * 1. Copyright Notice |
11 | * |
11 | * |
12 | * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. |
12 | * Some or all of this work - Copyright (c) 1999 - 2011, Intel Corp. |
13 | * All rights reserved. |
13 | * All rights reserved. |
14 | * |
14 | * |
15 | * 2. License |
15 | * 2. License |
16 | * |
16 | * |
Line 137... | Line 137... | ||
137 | #endif |
137 | #endif |
Line 138... | Line 138... | ||
138 | 138 | ||
139 | 139 | ||
140 | /******************************************************************************* |
- | |
141 | * |
- | |
142 | * FUNCTION: AcpiNsReportError |
- | |
143 | * |
- | |
144 | * PARAMETERS: ModuleName - Caller's module name (for error output) |
- | |
145 | * LineNumber - Caller's line number (for error output) |
- | |
146 | * InternalName - Name or path of the namespace node |
- | |
147 | * LookupStatus - Exception code from NS lookup |
- | |
148 | * |
- | |
149 | * RETURN: None |
- | |
150 | * |
- | |
151 | * DESCRIPTION: Print warning message with full pathname |
- | |
152 | * |
- | |
153 | ******************************************************************************/ |
- | |
154 | - | ||
155 | void |
- | |
156 | AcpiNsReportError ( |
- | |
157 | const char *ModuleName, |
- | |
158 | UINT32 LineNumber, |
- | |
159 | const char *InternalName, |
- | |
160 | ACPI_STATUS LookupStatus) |
- | |
161 | { |
- | |
162 | ACPI_STATUS Status; |
- | |
163 | UINT32 BadName; |
- | |
164 | char *Name = NULL; |
- | |
165 | - | ||
166 | - | ||
167 | AcpiOsPrintf ("ACPI Error (%s-%04d): ", ModuleName, LineNumber); |
- | |
168 | - | ||
169 | if (LookupStatus == AE_BAD_CHARACTER) |
- | |
170 | { |
- | |
171 | /* There is a non-ascii character in the name */ |
- | |
172 | - | ||
173 | ACPI_MOVE_32_TO_32 (&BadName, ACPI_CAST_PTR (UINT32, InternalName)); |
- | |
174 | AcpiOsPrintf ("[0x%4.4X] (NON-ASCII)", BadName); |
- | |
175 | } |
- | |
176 | else |
- | |
177 | { |
- | |
178 | /* Convert path to external format */ |
- | |
179 | - | ||
180 | Status = AcpiNsExternalizeName (ACPI_UINT32_MAX, |
- | |
181 | InternalName, NULL, &Name); |
- | |
182 | - | ||
183 | /* Print target name */ |
- | |
184 | - | ||
185 | if (ACPI_SUCCESS (Status)) |
- | |
186 | { |
- | |
187 | AcpiOsPrintf ("[%s]", Name); |
- | |
188 | } |
- | |
189 | else |
- | |
190 | { |
- | |
191 | AcpiOsPrintf ("[COULD NOT EXTERNALIZE NAME]"); |
- | |
192 | } |
- | |
193 | - | ||
194 | if (Name) |
- | |
195 | { |
- | |
196 | ACPI_FREE (Name); |
- | |
197 | } |
- | |
198 | } |
- | |
199 | - | ||
200 | AcpiOsPrintf (" Namespace lookup failure, %s\n", |
- | |
201 | AcpiFormatException (LookupStatus)); |
- | |
202 | } |
- | |
203 | - | ||
204 | - | ||
205 | /******************************************************************************* |
- | |
206 | * |
- | |
207 | * FUNCTION: AcpiNsReportMethodError |
- | |
208 | * |
- | |
209 | * PARAMETERS: ModuleName - Caller's module name (for error output) |
- | |
210 | * LineNumber - Caller's line number (for error output) |
- | |
211 | * Message - Error message to use on failure |
- | |
212 | * PrefixNode - Prefix relative to the path |
- | |
213 | * Path - Path to the node (optional) |
- | |
214 | * MethodStatus - Execution status |
- | |
215 | * |
- | |
216 | * RETURN: None |
- | |
217 | * |
- | |
218 | * DESCRIPTION: Print warning message with full pathname |
- | |
219 | * |
- | |
220 | ******************************************************************************/ |
- | |
221 | - | ||
222 | void |
- | |
223 | AcpiNsReportMethodError ( |
- | |
224 | const char *ModuleName, |
- | |
225 | UINT32 LineNumber, |
- | |
226 | const char *Message, |
- | |
227 | ACPI_NAMESPACE_NODE *PrefixNode, |
- | |
228 | const char *Path, |
- | |
229 | ACPI_STATUS MethodStatus) |
- | |
230 | { |
- | |
231 | ACPI_STATUS Status; |
- | |
232 | ACPI_NAMESPACE_NODE *Node = PrefixNode; |
- | |
233 | - | ||
234 | - | ||
235 | AcpiOsPrintf ("ACPI Error (%s-%04d): ", ModuleName, LineNumber); |
- | |
236 | - | ||
237 | if (Path) |
- | |
238 | { |
- | |
239 | Status = AcpiNsGetNode (PrefixNode, Path, ACPI_NS_NO_UPSEARCH, |
- | |
240 | &Node); |
- | |
241 | if (ACPI_FAILURE (Status)) |
- | |
242 | { |
- | |
243 | AcpiOsPrintf ("[Could not get node by pathname]"); |
- | |
244 | } |
- | |
245 | } |
- | |
246 | - | ||
247 | AcpiNsPrintNodePathname (Node, Message); |
- | |
248 | AcpiOsPrintf (", %s\n", AcpiFormatException (MethodStatus)); |
- | |
249 | } |
- | |
250 | - | ||
251 | - | ||
252 | /******************************************************************************* |
140 | /******************************************************************************* |
253 | * |
141 | * |
254 | * FUNCTION: AcpiNsPrintNodePathname |
142 | * FUNCTION: AcpiNsPrintNodePathname |
255 | * |
143 | * |
256 | * PARAMETERS: Node - Object |
144 | * PARAMETERS: Node - Object |