Rev 1498 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1498 | Rev 2216 | ||
---|---|---|---|
Line 6... | Line 6... | ||
6 | 6 | ||
7 | /****************************************************************************** |
7 | /****************************************************************************** |
8 | * |
8 | * |
9 | * 1. Copyright Notice |
9 | * 1. Copyright Notice |
10 | * |
10 | * |
11 | * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. |
11 | * Some or all of this work - Copyright (c) 1999 - 2011, Intel Corp. |
12 | * All rights reserved. |
12 | * All rights reserved. |
13 | * |
13 | * |
14 | * 2. License |
14 | * 2. License |
15 | * |
15 | * |
Line 122... | Line 122... | ||
122 | 122 | ||
123 | 123 | ||
Line 124... | Line -... | ||
124 | #define _COMPONENT ACPI_UTILITIES |
- | |
125 | ACPI_MODULE_NAME ("utmisc") |
- | |
126 | - | ||
127 | /* |
- | |
128 | * Common suffix for messages |
- | |
129 | */ |
- | |
Line 130... | Line 124... | ||
130 | #define ACPI_COMMON_MSG_SUFFIX \ |
124 | #define _COMPONENT ACPI_UTILITIES |
131 | AcpiOsPrintf (" (%8.8X/%s-%u)\n", ACPI_CA_VERSION, ModuleName, LineNumber) |
125 | ACPI_MODULE_NAME ("utmisc") |
132 | 126 | ||
133 | 127 | ||
Line 503... | Line 497... | ||
503 | 497 | ||
504 | return; |
498 | return; |
Line -... | Line 499... | ||
- | 499 | } |
|
- | 500 | ||
- | 501 | ||
- | 502 | #ifdef ACPI_ASL_COMPILER |
|
- | 503 | /******************************************************************************* |
|
- | 504 | * |
|
- | 505 | * FUNCTION: AcpiUtStrlwr (strlwr) |
|
- | 506 | * |
|
- | 507 | * PARAMETERS: SrcString - The source string to convert |
|
- | 508 | * |
|
- | 509 | * RETURN: None |
|
- | 510 | * |
|
- | 511 | * DESCRIPTION: Convert string to lowercase |
|
- | 512 | * |
|
- | 513 | * NOTE: This is not a POSIX function, so it appears here, not in utclib.c |
|
- | 514 | * |
|
- | 515 | ******************************************************************************/ |
|
- | 516 | ||
- | 517 | void |
|
- | 518 | AcpiUtStrlwr ( |
|
- | 519 | char *SrcString) |
|
- | 520 | { |
|
- | 521 | char *String; |
|
- | 522 | ||
- | 523 | ||
- | 524 | ACPI_FUNCTION_ENTRY (); |
|
- | 525 | ||
- | 526 | ||
- | 527 | if (!SrcString) |
|
- | 528 | { |
|
- | 529 | return; |
|
- | 530 | } |
|
- | 531 | ||
- | 532 | /* Walk entire string, lowercasing the letters */ |
|
- | 533 | ||
- | 534 | for (String = SrcString; *String; String++) |
|
- | 535 | { |
|
- | 536 | *String = (char) ACPI_TOLOWER (*String); |
|
- | 537 | } |
|
- | 538 | ||
- | 539 | return; |
|
- | 540 | } |
|
505 | } |
541 | #endif |
506 | 542 | ||
507 | 543 | ||
508 | /******************************************************************************* |
544 | /******************************************************************************* |
509 | * |
545 | * |
Line 1293... | Line 1329... | ||
1293 | 1329 | ||
1294 | return_ACPI_STATUS (AE_AML_INTERNAL); |
1330 | return_ACPI_STATUS (AE_AML_INTERNAL); |
Line 1295... | Line -... | ||
1295 | } |
- | |
1296 | - | ||
1297 | - | ||
1298 | /******************************************************************************* |
- | |
1299 | * |
- | |
1300 | * FUNCTION: AcpiError, AcpiException, AcpiWarning, AcpiInfo |
- | |
1301 | * |
- | |
1302 | * PARAMETERS: ModuleName - Caller's module name (for error output) |
- | |
1303 | * LineNumber - Caller's line number (for error output) |
- | |
1304 | * Format - Printf format string + additional args |
- | |
1305 | * |
- | |
1306 | * RETURN: None |
- | |
1307 | * |
- | |
1308 | * DESCRIPTION: Print message with module/line/version info |
- | |
1309 | * |
- | |
1310 | ******************************************************************************/ |
- | |
1311 | - | ||
1312 | void ACPI_INTERNAL_VAR_XFACE |
- | |
1313 | AcpiError ( |
- | |
1314 | const char *ModuleName, |
- | |
1315 | UINT32 LineNumber, |
- | |
1316 | const char *Format, |
- | |
1317 | ...) |
- | |
1318 | { |
- | |
1319 | va_list args; |
- | |
1320 | - | ||
1321 | - | ||
1322 | AcpiOsPrintf ("ACPI Error: "); |
- | |
1323 | - | ||
1324 | va_start (args, Format); |
- | |
1325 | AcpiOsVprintf (Format, args); |
- | |
1326 | ACPI_COMMON_MSG_SUFFIX; |
- | |
1327 | va_end (args); |
- | |
1328 | } |
- | |
1329 | - | ||
1330 | void ACPI_INTERNAL_VAR_XFACE |
- | |
1331 | AcpiException ( |
- | |
1332 | const char *ModuleName, |
- | |
1333 | UINT32 LineNumber, |
- | |
1334 | ACPI_STATUS Status, |
- | |
1335 | const char *Format, |
- | |
1336 | ...) |
- | |
1337 | { |
- | |
1338 | va_list args; |
- | |
1339 | - | ||
1340 | - | ||
1341 | AcpiOsPrintf ("ACPI Exception: %s, ", AcpiFormatException (Status)); |
- | |
1342 | - | ||
1343 | va_start (args, Format); |
- | |
1344 | AcpiOsVprintf (Format, args); |
- | |
1345 | ACPI_COMMON_MSG_SUFFIX; |
- | |
1346 | va_end (args); |
- | |
1347 | } |
- | |
1348 | - | ||
1349 | void ACPI_INTERNAL_VAR_XFACE |
- | |
1350 | AcpiWarning ( |
- | |
1351 | const char *ModuleName, |
- | |
1352 | UINT32 LineNumber, |
- | |
1353 | const char *Format, |
- | |
1354 | ...) |
- | |
1355 | { |
- | |
1356 | va_list args; |
- | |
1357 | - | ||
1358 | - | ||
1359 | AcpiOsPrintf ("ACPI Warning: "); |
- | |
1360 | - | ||
1361 | va_start (args, Format); |
- | |
1362 | AcpiOsVprintf (Format, args); |
- | |
1363 | ACPI_COMMON_MSG_SUFFIX; |
- | |
1364 | va_end (args); |
- | |
1365 | } |
- | |
1366 | - | ||
1367 | void ACPI_INTERNAL_VAR_XFACE |
- | |
1368 | AcpiInfo ( |
- | |
1369 | const char *ModuleName, |
- | |
1370 | UINT32 LineNumber, |
- | |
1371 | const char *Format, |
- | |
1372 | ...) |
- | |
1373 | { |
- | |
1374 | va_list args; |
- | |
1375 | - | ||
1376 | - | ||
1377 | AcpiOsPrintf ("ACPI: "); |
- | |
1378 | - | ||
1379 | va_start (args, Format); |
- | |
1380 | AcpiOsVprintf (Format, args); |
- | |
1381 | AcpiOsPrintf ("\n"); |
- | |
1382 | va_end (args); |
- | |
1383 | } |
- | |
1384 | - | ||
1385 | ACPI_EXPORT_SYMBOL (AcpiError) |
- | |
1386 | ACPI_EXPORT_SYMBOL (AcpiException) |
- | |
1387 | ACPI_EXPORT_SYMBOL (AcpiWarning) |
- | |
1388 | ACPI_EXPORT_SYMBOL (AcpiInfo) |
- | |
1389 | - | ||
1390 | - | ||
1391 | /******************************************************************************* |
- | |
1392 | * |
- | |
1393 | * FUNCTION: AcpiUtPredefinedWarning |
- | |
1394 | * |
- | |
1395 | * PARAMETERS: ModuleName - Caller's module name (for error output) |
- | |
1396 | * LineNumber - Caller's line number (for error output) |
- | |
1397 | * Pathname - Full pathname to the node |
- | |
1398 | * NodeFlags - From Namespace node for the method/object |
- | |
1399 | * Format - Printf format string + additional args |
- | |
1400 | * |
- | |
1401 | * RETURN: None |
- | |
1402 | * |
- | |
1403 | * DESCRIPTION: Warnings for the predefined validation module. Messages are |
- | |
1404 | * only emitted the first time a problem with a particular |
- | |
1405 | * method/object is detected. This prevents a flood of error |
- | |
1406 | * messages for methods that are repeatedly evaluated. |
- | |
1407 | * |
- | |
1408 | ******************************************************************************/ |
- | |
1409 | - | ||
1410 | void ACPI_INTERNAL_VAR_XFACE |
- | |
1411 | AcpiUtPredefinedWarning ( |
- | |
1412 | const char *ModuleName, |
- | |
1413 | UINT32 LineNumber, |
- | |
1414 | char *Pathname, |
- | |
1415 | UINT8 NodeFlags, |
- | |
1416 | const char *Format, |
- | |
1417 | ...) |
- | |
1418 | { |
- | |
1419 | va_list args; |
- | |
1420 | - | ||
1421 | - | ||
1422 | /* |
- | |
1423 | * Warning messages for this method/object will be disabled after the |
- | |
1424 | * first time a validation fails or an object is successfully repaired. |
- | |
1425 | */ |
- | |
1426 | if (NodeFlags & ANOBJ_EVALUATED) |
- | |
1427 | { |
- | |
1428 | return; |
- | |
1429 | } |
- | |
1430 | - | ||
1431 | AcpiOsPrintf ("ACPI Warning for %s: ", Pathname); |
- | |
1432 | - | ||
1433 | va_start (args, Format); |
- | |
1434 | AcpiOsVprintf (Format, args); |
- | |
1435 | ACPI_COMMON_MSG_SUFFIX; |
- | |
1436 | va_end (args); |
- | |
1437 | } |
- | |
1438 | - | ||
1439 | /******************************************************************************* |
- | |
1440 | * |
- | |
1441 | * FUNCTION: AcpiUtPredefinedInfo |
- | |
1442 | * |
- | |
1443 | * PARAMETERS: ModuleName - Caller's module name (for error output) |
- | |
1444 | * LineNumber - Caller's line number (for error output) |
- | |
1445 | * Pathname - Full pathname to the node |
- | |
1446 | * NodeFlags - From Namespace node for the method/object |
- | |
1447 | * Format - Printf format string + additional args |
- | |
1448 | * |
- | |
1449 | * RETURN: None |
- | |
1450 | * |
- | |
1451 | * DESCRIPTION: Info messages for the predefined validation module. Messages |
- | |
1452 | * are only emitted the first time a problem with a particular |
- | |
1453 | * method/object is detected. This prevents a flood of |
- | |
1454 | * messages for methods that are repeatedly evaluated. |
- | |
1455 | * |
- | |
1456 | ******************************************************************************/ |
- | |
1457 | - | ||
1458 | void ACPI_INTERNAL_VAR_XFACE |
- | |
1459 | AcpiUtPredefinedInfo ( |
- | |
1460 | const char *ModuleName, |
- | |
1461 | UINT32 LineNumber, |
- | |
1462 | char *Pathname, |
- | |
1463 | UINT8 NodeFlags, |
- | |
1464 | const char *Format, |
- | |
1465 | ...) |
- | |
1466 | { |
- | |
1467 | va_list args; |
- | |
1468 | - | ||
1469 | - | ||
1470 | /* |
- | |
1471 | * Warning messages for this method/object will be disabled after the |
- | |
1472 | * first time a validation fails or an object is successfully repaired. |
- | |
1473 | */ |
- | |
1474 | if (NodeFlags & ANOBJ_EVALUATED) |
- | |
1475 | { |
- | |
1476 | return; |
- | |
1477 | } |
- | |
1478 | - | ||
1479 | AcpiOsPrintf ("ACPI Info for %s: ", Pathname); |
- | |
1480 | - | ||
1481 | va_start (args, Format); |
- | |
1482 | AcpiOsVprintf (Format, args); |
- |