diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2013-07-26 18:20:00 +0000 |
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2013-07-26 18:20:00 +0000 |
| commit | dbded195f9840f9044a6828c8877c6bf0a956482 (patch) | |
| tree | e05da15a04629f6e36af5ca6c81a2efda47a9dc3 /source/common | |
| parent | 94c37fb2483cc09856a30e74879a69f2ccfe22f0 (diff) | |
Notes
Diffstat (limited to 'source/common')
| -rw-r--r-- | source/common/dmextern.c | 47 | ||||
| -rw-r--r-- | source/common/getopt.c | 20 |
2 files changed, 53 insertions, 14 deletions
diff --git a/source/common/dmextern.c b/source/common/dmextern.c index 5baa462579ee..e74311701bc4 100644 --- a/source/common/dmextern.c +++ b/source/common/dmextern.c @@ -719,34 +719,54 @@ AcpiDmEmitExternals ( AcpiDmUnresolvedWarning (1); + /* Emit any unresolved method externals in a single text block */ + + NextExternal = AcpiGbl_ExternalList; + while (NextExternal) + { + if ((NextExternal->Type == ACPI_TYPE_METHOD) && + (!NextExternal->Resolved)) + { + AcpiOsPrintf (" External (%s%s", + NextExternal->Path, + AcpiDmGetObjectTypeName (NextExternal->Type)); + + AcpiOsPrintf (") // Warning: Unresolved Method, " + "guessing %u arguments (may be incorrect, see warning above)\n", + NextExternal->Value); + + NextExternal->Emitted = TRUE; + } + + NextExternal = NextExternal->Next; + } + + AcpiOsPrintf ("\n"); + /* * Walk the list of externals (unresolved references) * found during the AML parsing */ while (AcpiGbl_ExternalList) { - AcpiOsPrintf (" External (%s%s", - AcpiGbl_ExternalList->Path, - AcpiDmGetObjectTypeName (AcpiGbl_ExternalList->Type)); - - if (AcpiGbl_ExternalList->Type == ACPI_TYPE_METHOD) + if (!AcpiGbl_ExternalList->Emitted) { - if (AcpiGbl_ExternalList->Resolved) + AcpiOsPrintf (" External (%s%s", + AcpiGbl_ExternalList->Path, + AcpiDmGetObjectTypeName (AcpiGbl_ExternalList->Type)); + + /* For methods, add a comment with the number of arguments */ + + if (AcpiGbl_ExternalList->Type == ACPI_TYPE_METHOD) { AcpiOsPrintf (") // %u Arguments\n", AcpiGbl_ExternalList->Value); } else { - AcpiOsPrintf (") // Warning: unresolved Method, " - "assuming %u arguments (may be incorrect, see warning above)\n", - AcpiGbl_ExternalList->Value); + AcpiOsPrintf (")\n"); } } - else - { - AcpiOsPrintf (")\n"); - } /* Free this external info block and move on to next external */ @@ -931,5 +951,4 @@ AcpiDmUnresolvedWarning ( (AcpiGbl_NumExternalMethods - AcpiGbl_ResolvedExternalMethods)); } } - } diff --git a/source/common/getopt.c b/source/common/getopt.c index f1921ee2c2cb..4bcf3dbc2821 100644 --- a/source/common/getopt.c +++ b/source/common/getopt.c @@ -197,6 +197,26 @@ AcpiGetopt( CurrentCharPtr = 1; } + /* Option has an optional argument? */ + + else if (*OptsPtr == '+') + { + if (argv[AcpiGbl_Optind][(int) (CurrentCharPtr+1)] != '\0') + { + AcpiGbl_Optarg = &argv[AcpiGbl_Optind++][(int) (CurrentCharPtr+1)]; + } + else if (++AcpiGbl_Optind >= argc) + { + AcpiGbl_Optarg = NULL; + } + else + { + AcpiGbl_Optarg = argv[AcpiGbl_Optind++]; + } + + CurrentCharPtr = 1; + } + /* Option has optional single-char arguments? */ else if (*OptsPtr == '^') |
